[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14491] add function populateSelect_activityCalendar(
From: |
Saul |
Subject: |
[Fmsystem-commits] [14491] add function populateSelect_activityCalendar() to activitycalendarfrontend |
Date: |
Fri, 27 Nov 2015 00:27:16 +0000 |
Revision: 14491
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14491
Author: psaul
Date: 2015-11-27 00:27:15 +0000 (Fri, 27 Nov 2015)
Log Message:
-----------
add function populateSelect_activityCalendar() to activitycalendarfrontend
Modified Paths:
--------------
branches/dev-syncromind/phpgwapi/js/jquery/common.js
Modified: branches/dev-syncromind/phpgwapi/js/jquery/common.js
===================================================================
--- branches/dev-syncromind/phpgwapi/js/jquery/common.js 2015-11-26
23:57:44 UTC (rev 14490)
+++ branches/dev-syncromind/phpgwapi/js/jquery/common.js 2015-11-27
00:27:15 UTC (rev 14491)
@@ -876,7 +876,26 @@
});
}
+function populateSelect_activityCalendar (url, container, attr) {
+ var select = document.createElement('select');
+ var option = document.createElement('option');
+ if (attr){
+ $.each(attr, function(i, v){
+ select.setAttribute(v['name'],v['value']);
+ })
+ }
+ $.get(url, function(r){
+ select.innerHTML = r;
+ container.html("");
+ if (r) {
+ container.append(select);
+ }
+ }).fail(function(){
+ alert("AJAX doesn't work");
+ });
+}
+
function createTableSchedule (d,u,c,r,cl,dt) {
var container = document.getElementById(d);
var xtable = document.createElement('table');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14491] add function populateSelect_activityCalendar() to activitycalendarfrontend,
Saul <=