fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Poprawione tooltipy i skróty klawiszowe.
[redakcja.git]
/
project
/
static
/
js
/
jquery.hpanel.js
diff --git
a/project/static/js/jquery.hpanel.js
b/project/static/js/jquery.hpanel.js
index
abb7a5b
..
bec82e0
100644
(file)
--- a/
project/static/js/jquery.hpanel.js
+++ b/
project/static/js/jquery.hpanel.js
@@
-43,7
+43,6
@@
$.fn.makeHorizPanel = function(options)
{
var root = $(this)
$.fn.makeHorizPanel = function(options)
{
var root = $(this)
- var all_panels = $('.panel-wrap', root)
/* create an overlay */
var overlay_root = $("<div class='panel-overlay'></div>");
/* create an overlay */
var overlay_root = $("<div class='panel-overlay'></div>");
@@
-51,23
+50,24
@@
var prev = null;
var prev = null;
- all_panels.each(function(i) {
+ $('*.panel-wrap', root).each( function()
+ {
var panel = $(this);
var handle = $('.panel-slider', panel);
var panel = $(this);
var handle = $('.panel-slider', panel);
- var overlay = $("<div class='panel-content-overlay panel-wrap'>
<p>Panel #"+i+"</p>
</div>");
+ var overlay = $("<div class='panel-content-overlay panel-wrap'>
</div>");
overlay_root.append(overlay);
overlay.data('panel', panel);
overlay.data('next', null);
overlay_root.append(overlay);
overlay.data('panel', panel);
overlay.data('next', null);
+ if (prev) prev.next = overlay;
+
if( panel.hasClass('last-panel') )
if( panel.hasClass('last-panel') )
+ {
overlay.css({'left': panel.css('left'), 'right': panel.css('right')});
overlay.css({'left': panel.css('left'), 'right': panel.css('right')});
- else
+ }
+ else {
overlay.css({'left': panel.css('left'), 'width': panel.css('width')});
overlay.css({'left': panel.css('left'), 'width': panel.css('width')});
-
- if (prev) prev.next = overlay;
-
- if(handle.length != 0) {
- $.log('Has handle: ' + panel.attr('id') );
+ $.log('Has handle: ' + panel.attr('id'));
overlay.append(handle.clone());
/* attach the trigger */
handle.mousedown(function(event) {
overlay.append(handle.clone());
/* attach the trigger */
handle.mousedown(function(event) {
@@
-83,12
+83,12
@@
(handle.outerWidth() || 10) + 'px');
$('.panel-content-overlay', panel).css('right',
(handle.outerWidth() || 10) + 'px');
(handle.outerWidth() || 10) + 'px');
$('.panel-content-overlay', panel).css('right',
(handle.outerWidth() || 10) + 'px');
- }
-
+ }
;
+
prev = overlay;
});
prev = overlay;
});
- root.bind('hpanel:panel-resize-start', $.hpanel.resize_start);
+ root.bind('hpanel:panel-resize-start', $.hpanel.resize_start);
};
})(jQuery);
};
})(jQuery);