fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14181] modify function showInfo()


From: Saul
Subject: [Fmsystem-commits] [14181] modify function showInfo()
Date: Fri, 16 Oct 2015 00:05:28 +0000

Revision: 14181
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14181
Author:   psaul
Date:     2015-10-16 00:05:28 +0000 (Fri, 16 Oct 2015)
Log Message:
-----------
modify function showInfo()

Modified Paths:
--------------
    branches/dev-syncromind/booking/js/booking/schedule.js

Modified: branches/dev-syncromind/booking/js/booking/schedule.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/schedule.js      2015-10-16 
00:04:06 UTC (rev 14180)
+++ branches/dev-syncromind/booking/js/booking/schedule.js      2015-10-16 
00:05:28 UTC (rev 14181)
@@ -115,7 +115,7 @@
     window.location.href = url;
 }
 
-schedule.showInfo = function(url, resource) {
+schedule.showInfo2 = function(url, resource) {
     var content_overlay = document.getElementById('content_overlay');
     var overlay = document.createElement('div');
     var img = document.createElement('img');
@@ -145,6 +145,50 @@
     });
 }
 
+schedule.showInfo = function(url, resource) {
+    var dialog = document.getElementById('dialog_schedule');
+    var img = document.createElement('img');
+    
img.setAttribute('src','/portico/phpgwapi/templates/pure/images/loading_overlay.gif');
+    img.style.display = "block";
+    img.style.margin = "37px auto 0";
+    dialog.appendChild(img);
+    
+    schedule.dialogSchedule.dialog("close");
+    schedule.dialogSchedule.dialog("destroy");
+    schedule.createDialogSchedule(300);
+    schedule.dialogSchedule.dialog("open");
+    
+    resource = (resource) ? resource : null;
+    url = url.replace(/&/gi, '&') + '&resource=' + resource;
+    
+    $.get(url, function(data){
+       schedule.dialogSchedule.dialog("close");
+       schedule.dialogSchedule.dialog("destroy");
+       dialog.innerHTML = data;
+       schedule.createDialogSchedule(650);
+       schedule.dialogSchedule.dialog("open");
+    })
+    .fail(function() {
+        schedule.dialogSchedule.dialog("close");
+        alert( "Failed to load booking details page" );
+    });
+}
+
+schedule.createDialogSchedule = function(w){
+    schedule.dialogSchedule = $('#dialog_schedule').dialog({
+        autoOpen: false,
+        modal: false,
+        width: w,
+        close: function(){
+            schedule.cleanDialog();
+        }
+    });
+}
+
+schedule.cleanDialog = function(){
+    $('#dialog_schedule').html("");
+}
+
 schedule.closeOverlay = function(){
     $('#schedule_overlay').hide().remove();
 }
@@ -182,6 +226,10 @@
        });
 };
 
+
+
+
+
 /*
 colors = ['color1', 'color2', 'color3', 'color4', 'color5', 'color6', 
'color7', 'color8', 'color9', 'color10',
                  'color11', 'color12', 'color13', 'color14', 'color15', 
'color16', 'color17', 'color18', 'color19', 'color20',




reply via email to

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