fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14331] add JqueryPortico.booking.inlineImages


From: Saul
Subject: [Fmsystem-commits] [14331] add JqueryPortico.booking.inlineImages
Date: Wed, 11 Nov 2015 23:54:55 +0000

Revision: 14331
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14331
Author:   psaul
Date:     2015-11-11 23:54:54 +0000 (Wed, 11 Nov 2015)
Log Message:
-----------
add JqueryPortico.booking.inlineImages

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

Modified: branches/dev-syncromind/booking/js/booking/common.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/common.js        2015-11-11 
23:54:29 UTC (rev 14330)
+++ branches/dev-syncromind/booking/js/booking/common.js        2015-11-11 
23:54:54 UTC (rev 14331)
@@ -794,3 +794,23 @@
     document.body.appendChild(form);
     form.submit();
 };
+
+
+JqueryPortico.booking.inlineImages = function (container, url) {
+    container = document.getElementById(container);
+    $.get(url, function(data){
+        var dlImage = document.createElement('dl');
+        dlImage.setAttribute('class', 'proplist images');
+        var results = data.ResultSet.Result;
+        if (typeof results == 'object') {
+            $.each(results, function(i,v){
+                var imgEl = 
dlImage.appendChild(document.createElement('dd')).appendChild(document.createElement('img'));
+                var captionEl = 
dlImage.appendChild(document.createElement('dt'));
+                imgEl.setAttribute('src', v.src.replace(/&/gi, '&'));
+                captionEl.appendChild(document.createTextNode(v.description));
+                container.appendChild(dlImage);
+
+            });
+        }
+    });
+}
\ No newline at end of file




reply via email to

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