fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [9394]


From: Torstein
Subject: [Fmsystem-commits] [9394]
Date: Mon, 14 May 2012 11:09:06 +0000

Revision: 9394
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9394
Author:   vator
Date:     2012-05-14 11:09:06 +0000 (Mon, 14 May 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.uicontrol_location.inc.php
    trunk/controller/js/controller/ajax.js

Added Paths:
-----------
    trunk/controller/js/controller/yui_drag_drop_garbish.js

Removed Paths:
-------------
    trunk/controller/js/controller/yui_drag_drop.js

Modified: trunk/controller/inc/class.uicontrol_location.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol_location.inc.php       2012-05-14 
11:08:55 UTC (rev 9393)
+++ trunk/controller/inc/class.uicontrol_location.inc.php       2012-05-14 
11:09:06 UTC (rev 9394)
@@ -172,12 +172,12 @@
                                        )
                                )
                        );
-                       
+
                        phpgwapi_yui::load_widget('paginator');
                        
                        self::add_javascript('controller', 'yahoo', 
'control_tabs.js');
                        self::add_javascript('controller', 'controller', 
'jquery.js');
-                       self::add_javascript('controller', 'controller', 
'ajax.js');
+                       self::add_javascript('controller', 'controller', 
'ajax.js');    
 
                        
self::render_template_xsl(array('control_location/control_location_tabs', 
'control_location/view_locations_for_control', 'common' ), $data);            
                }

Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js      2012-05-14 11:08:55 UTC (rev 
9393)
+++ trunk/controller/js/controller/ajax.js      2012-05-14 11:09:06 UTC (rev 
9394)
@@ -58,8 +58,6 @@
                });     
     });
        
-       
-       // 
        $("#choose_my_location").change(function () {
                 var location_code = $(this).val();
                 var thisForm = $(this).parents("form");
@@ -109,7 +107,7 @@
                                        htmlString  += "<option>Ingen 
kontroller</option>"
                                        $("#cat_id").html( htmlString );
                                }
-                         }
+                         },
                  error: function(XMLHttpRequest, textStatus, errorThrown) {
                    if (XMLHttpRequest.status === 401) {
                      location.href = '/';
@@ -149,8 +147,6 @@
          });
     });
        
-       // file: uicheck_list.xsl
-       // When control area is selected, controls are fetched from db and 
control select list is populated
        $("#control_area_list").change(function () {
                var control_area_id = $(this).val();
                 var oArgs = 
{menuaction:'controller.uicontrol.get_controls_by_control_area', 
phpgw_return_as:'json'};
@@ -730,7 +726,7 @@
                });
        });
        
-       $("a.quick_edit").live("click", function(e){
+       $("a.quick_edit_case").live("click", function(e){
                var clickElem = $(this);
                var clickRow = $(this).closest("li");
                                                                        
@@ -874,13 +870,6 @@
                return false;
        });
        
-       /*
-       $(".frm_save_check_item").live("click", function(e){
-               var thisForm = $(this);
-               var submitBnt = $(thisForm).find("input[type='submit']");
-               $(submitBnt).removeClass("not_active");
-       });
-       */
        $(".frm_register_case").live("click", function(e){
                var thisForm = $(this);
                var submitBnt = $(thisForm).find("input[type='submit']");
@@ -906,14 +895,7 @@
                var wrpElem = $(this).parents("dd");
                $(wrpElem).find(".help_text").fadeOut(300);
        });
-       /*
-       $(".frm_save_check_item").click(function(e){
-               var thisForm = $(this);
-               var submitBnt = $(thisForm).find("input[type='submit']");
-               
-               $(submitBnt).removeClass("not_active");
-       });
-       */
+       
        $(".frm_save_control_item").click(function(e){
                var thisForm = $(this);
                var submitBnt = $(thisForm).find("input[type='submit']");

Deleted: trunk/controller/js/controller/yui_drag_drop.js
===================================================================
--- trunk/controller/js/controller/yui_drag_drop.js     2012-05-14 11:08:55 UTC 
(rev 9393)
+++ trunk/controller/js/controller/yui_drag_drop.js     2012-05-14 11:09:06 UTC 
(rev 9394)
@@ -1,96 +0,0 @@
-YUI().use('dd-constrain', 'dd-proxy', 'dd-drop', function(Y) {
-    //Listen for all drop:over events
-    Y.DD.DDM.on('drop:over', function(e) {
-        //Get a reference to our drag and drop nodes
-        var drag = e.drag.get('node'),
-            drop = e.drop.get('node');
-        
-        //Are we dropping on a li node?
-        if (drop.get('tagName').toLowerCase() === 'li') {
-            //Are we not going up?
-            if (!goingUp) {
-                drop = drop.get('nextSibling');
-            }
-            //Add the node to this list
-            e.drop.get('node').get('parentNode').insertBefore(drag, drop);
-            //Resize this nodes shim, so we can drop on it later.
-            e.drop.sizeShim();
-        }
-    });
-    //Listen for all drag:drag events
-    Y.DD.DDM.on('drag:drag', function(e) {
-        //Get the last y point
-        var y = e.target.lastXY[1];
-        //is it greater than the lastY var?
-        if (y < lastY) {
-            //We are going up
-            goingUp = true;
-        } else {
-            //We are going down.
-            goingUp = false;
-        }
-        //Cache for next check
-        lastY = y;
-    });
-    //Listen for all drag:start events
-    Y.DD.DDM.on('drag:start', function(e) {
-        //Get our drag object
-        var drag = e.target;
-        //Set some styles here
-        drag.get('node').setStyle('opacity', '.25');
-        drag.get('dragNode').set('innerHTML', 
drag.get('node').get('innerHTML'));
-        drag.get('dragNode').setStyles({
-            opacity: '.5',
-            borderColor: drag.get('node').getStyle('borderColor'),
-            backgroundColor: drag.get('node').getStyle('backgroundColor')
-        });
-    });
-    //Listen for a drag:end events
-    Y.DD.DDM.on('drag:end', function(e) {
-        var drag = e.target;
-        //Put our styles back
-        drag.get('node').setStyles({
-            visibility: '',
-            opacity: '1'
-        });
-    });
-    //Listen for all drag:drophit events
-    Y.DD.DDM.on('drag:drophit', function(e) {
-        var drop = e.drop.get('node'),
-            drag = e.drag.get('node');
-
-        //if we are not on an li, we must have been dropped on a ul
-        if (drop.get('tagName').toLowerCase() !== 'li') {
-            if (!drop.contains(drag)) {
-                drop.appendChild(drag);
-            }
-        }
-    });
-    
-    //Static Vars
-    var goingUp = false, lastY = 0;
-
-    //Get the list of li's in the lists and make them draggable
-    var lis = Y.Node.all('#play ul li');
-    lis.each(function(v, k) {
-        var dd = new Y.DD.Drag({
-            node: v,
-            target: {
-                padding: '0 0 0 20'
-            }
-        }).plug(Y.Plugin.DDProxy, {
-            moveOnEnd: false
-        }).plug(Y.Plugin.DDConstrained, {
-            constrain2node: '#play'
-        });
-    });
-
-    //Create simple targets for the 2 lists.
-    var uls = Y.Node.all('#play ul');
-    uls.each(function(v, k) {
-        var tar = new Y.DD.Drop({
-            node: v
-        });
-    });
-    
-});
\ No newline at end of file

Copied: trunk/controller/js/controller/yui_drag_drop_garbish.js (from rev 9172, 
trunk/controller/js/controller/yui_drag_drop.js)
===================================================================
--- trunk/controller/js/controller/yui_drag_drop_garbish.js                     
        (rev 0)
+++ trunk/controller/js/controller/yui_drag_drop_garbish.js     2012-05-14 
11:09:06 UTC (rev 9394)
@@ -0,0 +1,96 @@
+YUI().use('dd-constrain', 'dd-proxy', 'dd-drop', function(Y) {
+    //Listen for all drop:over events
+    Y.DD.DDM.on('drop:over', function(e) {
+        //Get a reference to our drag and drop nodes
+        var drag = e.drag.get('node'),
+            drop = e.drop.get('node');
+        
+        //Are we dropping on a li node?
+        if (drop.get('tagName').toLowerCase() === 'li') {
+            //Are we not going up?
+            if (!goingUp) {
+                drop = drop.get('nextSibling');
+            }
+            //Add the node to this list
+            e.drop.get('node').get('parentNode').insertBefore(drag, drop);
+            //Resize this nodes shim, so we can drop on it later.
+            e.drop.sizeShim();
+        }
+    });
+    //Listen for all drag:drag events
+    Y.DD.DDM.on('drag:drag', function(e) {
+        //Get the last y point
+        var y = e.target.lastXY[1];
+        //is it greater than the lastY var?
+        if (y < lastY) {
+            //We are going up
+            goingUp = true;
+        } else {
+            //We are going down.
+            goingUp = false;
+        }
+        //Cache for next check
+        lastY = y;
+    });
+    //Listen for all drag:start events
+    Y.DD.DDM.on('drag:start', function(e) {
+        //Get our drag object
+        var drag = e.target;
+        //Set some styles here
+        drag.get('node').setStyle('opacity', '.25');
+        drag.get('dragNode').set('innerHTML', 
drag.get('node').get('innerHTML'));
+        drag.get('dragNode').setStyles({
+            opacity: '.5',
+            borderColor: drag.get('node').getStyle('borderColor'),
+            backgroundColor: drag.get('node').getStyle('backgroundColor')
+        });
+    });
+    //Listen for a drag:end events
+    Y.DD.DDM.on('drag:end', function(e) {
+        var drag = e.target;
+        //Put our styles back
+        drag.get('node').setStyles({
+            visibility: '',
+            opacity: '1'
+        });
+    });
+    //Listen for all drag:drophit events
+    Y.DD.DDM.on('drag:drophit', function(e) {
+        var drop = e.drop.get('node'),
+            drag = e.drag.get('node');
+
+        //if we are not on an li, we must have been dropped on a ul
+        if (drop.get('tagName').toLowerCase() !== 'li') {
+            if (!drop.contains(drag)) {
+                drop.appendChild(drag);
+            }
+        }
+    });
+    
+    //Static Vars
+    var goingUp = false, lastY = 0;
+
+    //Get the list of li's in the lists and make them draggable
+    var lis = Y.Node.all('#play ul li');
+    lis.each(function(v, k) {
+        var dd = new Y.DD.Drag({
+            node: v,
+            target: {
+                padding: '0 0 0 20'
+            }
+        }).plug(Y.Plugin.DDProxy, {
+            moveOnEnd: false
+        }).plug(Y.Plugin.DDConstrained, {
+            constrain2node: '#play'
+        });
+    });
+
+    //Create simple targets for the 2 lists.
+    var uls = Y.Node.all('#play ul');
+    uls.each(function(v, k) {
+        var tar = new Y.DD.Drop({
+            node: v
+        });
+    });
+    
+});
\ No newline at end of file


Property changes on: trunk/controller/js/controller/yui_drag_drop_garbish.js
___________________________________________________________________
Added: svn:mime-type
   + text/plain




reply via email to

[Prev in Thread] Current Thread [Next in Thread]