move notes libs to ext folder, fix a few bugs
it would be nice to take this out of beta, but it still has major issues with image resizing / unable to edit or delete notes
This commit is contained in:
parent
543600dc0e
commit
78c2731a12
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
@ -4,6 +4,9 @@ $(function() {
|
||||
if(window.notes) {
|
||||
$('#main_image').load(function(){
|
||||
$('#main_image').imgNotes({notes: window.notes});
|
||||
|
||||
//Make sure notes are always shown
|
||||
$('#main_image').off('mouseenter mouseleave');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
.note {
|
||||
display: none;
|
||||
background-color: #fffdef;
|
||||
border: #412a21 1px solid;
|
||||
display: block;
|
||||
|
||||
background-color: #FFE;
|
||||
border: 1px dashed black;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
@ -74,4 +75,13 @@
|
||||
}
|
||||
|
||||
.imgareaselect-selection {
|
||||
}
|
||||
}
|
||||
|
||||
/* Makes sure the note block is hidden */
|
||||
section#note_system {
|
||||
height: 0;
|
||||
}
|
||||
section#note_system > .blockbody {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
@ -44,6 +44,12 @@ class NotesTheme extends Themelet {
|
||||
|
||||
// check action POST on form
|
||||
public function display_note_system(Page $page, $image_id, $recovered_notes, $adminOptions) {
|
||||
$base_href = get_base_href();
|
||||
|
||||
$page->add_html_header("<script src='$base_href/ext/notes/lib/jquery.imgnotes-1.0.min.js' type='text/javascript'></script>");
|
||||
$page->add_html_header("<script src='$base_href/ext/notes/lib/jquery.imgareaselect-1.0.0-rc1.min.js' type='text/javascript'></script>");
|
||||
$page->add_html_header("<link rel='stylesheet' type='text/css' href='$base_href/ext/notes/lib/jquery.imgnotes-1.0.min.css' />");
|
||||
|
||||
$to_json = array();
|
||||
foreach($recovered_notes as $note) {
|
||||
$parsedNote = $note["note"];
|
||||
@ -121,7 +127,7 @@ class NotesTheme extends Themelet {
|
||||
|
||||
$html .= "</div>";
|
||||
|
||||
$page->add_block(new Block(null, $html, "main", 1));
|
||||
$page->add_block(new Block(null, $html, "main", 1, 'note_system'));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user