corrade-nucleus-nucleons – Diff between revs 29 and 30

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 29 Rev 30
Line 1... Line 1...
1 // Retrieve the top-most window z-index. 1 // Retrieve the top-most window z-index.
2 function getTopWindowIndex() { 2 function getTopWindowIndex() {
3 return Math.max.apply(null, 3 return Math.max.apply(null,
4 $.map($('.window-manager-window'), function(e, n) { 4 $.map($('.window-manager-window'), function(e, n) {
5 if ($(e).css('position') != 'static') 5 if ($(e).css('position') != 'static')
6 return parseInt($(e).css('z-index')) || 1; 6 return parseInt($(e).css('z-index')) || 2;
7 }) 7 })
8 ); 8 );
9 } 9 }
Line 10... Line 10...
10   10  
Line 34... Line 34...
34 event.target.style.zIndex = getTopWindowIndex() + 1; 34 event.target.style.zIndex = getTopWindowIndex() + 1;
35 event.target.style.opacity = 0.5; 35 event.target.style.opacity = 0.5;
36 } 36 }
37 }) 37 })
38 .allowFrom('.panel-heading'); 38 .allowFrom('.panel-heading');
-   39
-   40 // Window manager icons.
-   41 interact('.window-manager-icon')
-   42 .draggable({
-   43 // enable inertial throwing
-   44 inertia: false,
-   45 // keep the element within the area of it's parent
-   46 restrict: {
-   47 restriction: $('#window-manager-desktop').get(0),
-   48 endOnly: true,
-   49 elementRect: { top: 0, left: 0, bottom: 1, right: 1 }
-   50 },
-   51 snap: {
-   52 targets: [
-   53 interact.createSnapGrid({ x: 64, y: 64 })
-   54 ],
-   55 range: Infinity,
-   56 relativePoints: [ { x: 0, y: 0 } ]
-   57 },
-   58 // enable autoScroll
-   59 autoScroll: true,
-   60
-   61 onmove: dragMoveListener,
-   62 onend: function (event) {
-   63 event.target.style.opacity = 1;
-   64 },
-   65 onstart: function(event) {
-   66 event.target.style.opacity = 0.5;
-   67 }
-   68 });
Line 39... Line 69...
39   69  
40 // Closing windows. 70 // Closing windows.
41 $(document).on('click', '.window-manager-close-button', function(event) { 71 $(document).on('click', '.window-manager-close-button', function(event) {
42 $('#' + $(this).data('target')).detach(); 72 $('#' + $(this).data('target')).detach();