fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12486]


From: Nelson Guerra
Subject: [Fmsystem-commits] [12486]
Date: Fri, 19 Dec 2014 23:15:15 +0000

Revision: 12486
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12486
Author:   nelson224
Date:     2014-12-19 23:15:15 +0000 (Fri, 19 Dec 2014)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/property/js/yahoo/entity.edit.js

Modified: branches/dev-syncromind/property/js/yahoo/entity.edit.js
===================================================================
--- branches/dev-syncromind/property/js/yahoo/entity.edit.js    2014-12-19 
23:03:01 UTC (rev 12485)
+++ branches/dev-syncromind/property/js/yahoo/entity.edit.js    2014-12-19 
23:15:15 UTC (rev 12486)
@@ -1,78 +1,4 @@
-var  myDataSource, myDataTable, myContextMenu;
-var  myPaginator_0, myDataTable_0;
-var  myPaginator_1, myDataTable_1;
-var  myPaginator_2, myDataTable_2;
-var  myPaginator_3, myDataTable_3;
-/********************************************************************************/
-var FormatterCenter = function(elCell, oRecord, oColumn, oData)
-{
-       elCell.innerHTML = "<center>"+oData+"</center>";
-}
 
-/********************************************************************************/
-
-       this.myParticularRenderEvent = function()
-       {
-               this.addFooterDatatable3(myPaginator_3,myDataTable_3);
-       }
-
-       var FormatterEdit = function(elCell, oRecord, oColumn, oData)
-       {
-               var location_id = oRecord.getData('location_id');
-               var id = oRecord.getData('id');
-               var inventory_id = oRecord.getData('inventory_id');
-               elCell.innerHTML = "<a 
href=\"javascript:showlightbox_edit_inventory(" + location_id + ',' + id + ',' 
+ inventory_id + ')">' + oColumn.label + "</a>";
-       }       
-
-       var FormatterCalendar = function(elCell, oRecord, oColumn, oData)
-       {
-               var location_id = oRecord.getData('location_id');
-               var id = oRecord.getData('id');
-               var inventory_id = oRecord.getData('inventory_id');
-               elCell.innerHTML = "<a 
href=\"javascript:showlightbox_show_calendar(" + location_id + ',' + id + ',' + 
inventory_id + ')">' + oColumn.label + "</a>";
-       }       
-
-       var FormatterCenter = function(elCell, oRecord, oColumn, oData)
-       {
-               var amount = YAHOO.util.Number.format(oData, {decimalPlaces:0, 
decimalSeparator:",", thousandsSeparator:" "});
-               elCell.innerHTML = "<div align=\"right\">"+amount+"</div>";
-       }       
-
-       var FormatterAmount0 = function(elCell, oRecord, oColumn, oData)
-       {
-               var amount = YAHOO.util.Number.format(oData, {decimalPlaces:0, 
decimalSeparator:",", thousandsSeparator:" "});
-               elCell.innerHTML = "<div align=\"right\">"+amount+"</div>";
-       }       
-
-       this.addFooterDatatable3 = function(paginator,datatable)
-       {
-               //call getSumPerPage(name of column) in property.js
-               tmp_sum1 = getTotalSum('inventory',0,paginator,datatable);
-
-               if(typeof(tableYUI)=='undefined')
-               {
-                       tableYUI = 
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[3].parentNode;
-                       tableYUI.setAttribute("id","tableYUI");
-               }
-               else
-               {
-                       tableYUI.deleteTFoot();
-               }
-
-               //Create ROW
-               newTR = document.createElement('tr');
-
-               td_sum('Sum');
-               td_empty(2);
-               td_sum(tmp_sum1);
-               td_empty(5);
-
-               myfoot = tableYUI.createTFoot();
-               myfoot.setAttribute("id","myfoot");
-               myfoot.appendChild(newTR);
-       }
-
-
        this.fileuploader = function()
        {
                var sUrl = phpGWLink('index.php', fileuploader_action);
@@ -99,7 +25,7 @@
                var oArgs = {menuaction:'property.uientity.add_inventory', 
location_id:location_id, id: id};
                var sUrl = phpGWLink('index.php', oArgs);
 
-               TINY.box.show({iframe:sUrl, 
boxid:'frameless',width:750,height:550,fixed:false,maskid:'darkmask',maskopacity:40,
 mask:true, animate:true,
+               TINY.box.show({iframe:sUrl, 
boxid:'frameless',width:650,height:600,fixed:false,maskid:'darkmask',maskopacity:40,
 mask:true, animate:true,
                close: true,
                closejs:function(){refresh_inventory(location_id, id)}
                });
@@ -127,48 +53,16 @@
                });
        }
 
-
        this.refresh_inventory = function(location_id, id)
        {
                var oArgs = {menuaction:'property.uientity.get_inventory', 
location_id:location_id, id: id};
                var requestUrl = phpGWLink('index.php', oArgs, true);
-//alert(requestUrl);
-               execute_async(myDataTable_3, oArgs);
+
+               var api = oTable3.api();
+               api.ajax.url( requestUrl ).load();
        }
 
 
-YAHOO.util.Event.addListener(window, "load", function()
-               {
-                       var loader = new YAHOO.util.YUILoader();
-                       loader.addModule({
-                               name: "anyone",
-                               type: "js",
-                           fullpath: property_js
-                           });
-
-                       loader.require("anyone");
-                   loader.insert();
-               });
-
-YAHOO.util.Event.addListener(window, "load", function()
-{
-               lightbox = new YAHOO.widget.Dialog("lightbox-placeholder",
-               {
-                       width : "600px",
-                       fixedcenter : true,
-                       visible : false,
-                       modal : false
-                       //draggable: true,
-                       //constraintoviewport : true
-               });
-
-               lightbox.render();
-
-               YAHOO.util.Dom.setStyle('lightbox-placeholder', 'display', 
'block');
-});
-
-
-// jquery
 $(document).ready(function(){
        
        $("#treeDiv1").jstree({
@@ -182,26 +76,26 @@
                 "plugins" : [ "themes","html_data","ui","state" ]
        });
 
-        var count = 0;
-        $("#treeDiv1").bind("select_node.jstree", function (event, data) {
-            count += 1;
-                var divd = 
data.instance.get_node(data.selected[0]).original['link']; 
-            if(count > 1)
-            {
-                window.location.href = divd; 
-            }
+       var count = 0;
+       $("#treeDiv1").bind("select_node.jstree", function (event, data) {
+               count += 1;
+                       var divd = 
data.instance.get_node(data.selected[0]).original['link']; 
+               if(count > 1)
+               {
+                       window.location.href = divd; 
+               }
        });
         
-        $('#collapse').on('click',function(){
-            $(this).attr('href','javascript:;');
-            $('#treeDiv1').jstree('close_all');
-        })
-        
-        $('#expand').on('click',function(){
-            $(this).attr('href','javascript:;');
-            $('#treeDiv1').jstree('open_all');
-        });
+       $('#collapse').on('click',function(){
+               $(this).attr('href','javascript:;');
+               $('#treeDiv1').jstree('close_all');
+       })
 
+       $('#expand').on('click',function(){
+               $(this).attr('href','javascript:;');
+               $('#treeDiv1').jstree('open_all');
+       });
+
        $("#edit_inventory").on("submit", function(e){
 
                e.preventDefault();




reply via email to

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