From 3d11df44a9a213e9405d0d8f8e64472f22967705 Mon Sep 17 00:00:00 2001 From: Daku Date: Sat, 12 Apr 2014 00:26:34 +0100 Subject: [PATCH 1/2] fix various bugs with notes ext --- ext/notes/border-h.gif | Bin 0 -> 72 bytes ext/notes/border-v.gif | Bin 0 -> 72 bytes ext/notes/script.js | 1 + ext/notes/style.css | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 ext/notes/border-h.gif create mode 100644 ext/notes/border-v.gif diff --git a/ext/notes/border-h.gif b/ext/notes/border-h.gif new file mode 100644 index 0000000000000000000000000000000000000000..a2aa5b0d09bf7215199dbf9a291b34b11d0352d4 GIT binary patch literal 72 zcmZ?wbhEHbWMg1tSjfQe|Nnmm1_m=TGay6ppOkY^YGO%hib8p2NrpmVR$@g?eqxGV XW?ou8gAPy~14tJG6LU)|D}yxvaY_|= literal 0 HcmV?d00001 diff --git a/ext/notes/border-v.gif b/ext/notes/border-v.gif new file mode 100644 index 0000000000000000000000000000000000000000..4bfd55564099537d38d4112f550b8974744de3ca GIT binary patch literal 72 zcmZ?wbhEHbWMp7tSjfQe|Nnmm1_m=TGay6ppOkY^YGO%hib8p2NrpmVR$@g?eqxGV XW?ou8gAPy~14tJG6LU)|D}yxvaW)ls literal 0 HcmV?d00001 diff --git a/ext/notes/script.js b/ext/notes/script.js index 43f492b2..6682a74b 100644 --- a/ext/notes/script.js +++ b/ext/notes/script.js @@ -3,6 +3,7 @@ $(function() { if(window.notes) { $('#main_image').imgNotes({notes: window.notes}); + $(window).resize(); //Simulate window resize to fix note positioning } $('#cancelnote').click(function(){ diff --git a/ext/notes/style.css b/ext/notes/style.css index bb0e0160..111d8971 100644 --- a/ext/notes/style.css +++ b/ext/notes/style.css @@ -33,3 +33,45 @@ #noteform textarea, #noteEditForm textarea { width: 100%; } + +/* + * imgAreaSelect default style + */ + +.imgareaselect-border1 { + background: url(border-v.gif) repeat-y left top; +} + +.imgareaselect-border2 { + background: url(border-h.gif) repeat-x left top; +} + +.imgareaselect-border3 { + background: url(border-v.gif) repeat-y right top; +} + +.imgareaselect-border4 { + background: url(border-h.gif) repeat-x left bottom; +} + +.imgareaselect-border1, .imgareaselect-border2, +.imgareaselect-border3, .imgareaselect-border4 { + filter: alpha(opacity=50); + opacity: 0.5; +} + +.imgareaselect-handle { + background-color: #fff; + border: solid 1px #000; + filter: alpha(opacity=50); + opacity: 0.5; +} + +.imgareaselect-outer { + /*background-color: #000;*/ + filter: alpha(opacity=50); + opacity: 0.5; +} + +.imgareaselect-selection { +} \ No newline at end of file From ae0a4725a06e7268165116df9cd22ce7299d11bf Mon Sep 17 00:00:00 2001 From: Daku Date: Fri, 23 May 2014 21:46:13 +0100 Subject: [PATCH 2/2] avoid loading imgnotes until image is fully loaded --- ext/notes/script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/notes/script.js b/ext/notes/script.js index 6682a74b..6a90f0f7 100644 --- a/ext/notes/script.js +++ b/ext/notes/script.js @@ -2,8 +2,9 @@ $(function() { if(window.notes) { - $('#main_image').imgNotes({notes: window.notes}); - $(window).resize(); //Simulate window resize to fix note positioning + $('#main_image').load(function(){ + $('#main_image').imgNotes({notes: window.notes}); + }); } $('#cancelnote').click(function(){