Table of Contents | ||||
---|---|---|---|---|
|
AssignmentManager
- URL : /jw/js/json/util.js
- Auto included in all userview pages.
- Used to deal with assignment of a logged in user.
...
Code Block | ||
---|---|---|
| ||
AssignmentManager.withdrawAssignment('http://localhost/jw', '1_1_activity'); |
ConnectionManager
- URL : /jw/js/json/util.js
- Auto included in all userview pages.
- Convenient method to do AJAX call.
...
Code Block | ||
---|---|---|
| ||
var callback = { success : function(response){ //do something } }; ConnectionManager.post('http://localhost/test', callback, 'id=6&name=test'); |
FormUtil
- URL : /jw/js/json/formUtil.js
- Auto included in page using form.
- Convenient method to interact with form field.
...
Code Block | ||
---|---|---|
| ||
var values = FormUtil.getValues("field1"); for (var i = 0; i < values.length; i++) { console.log(values[i]); } |
JPopup
- URL : /jw/js/json/ui_ext.js
- Auto included in all userview pages.
- Convenient method to create/show/hide a popup dialog to display a page.
...
Code Block | ||
---|---|---|
| ||
var params = { id : "1", name : "test" }; JPopup.show("testPopup", "http://www.joget.org", params); |
UI
- URL : /jw/js/json/ui.js
- Auto included in all userview pages.
- Convenient method to retrieve value for UI usages.
...
Code Block | ||
---|---|---|
| ||
var url = "http://localhost/jw/form/embed?" + UI.userviewThemeParams(); |
UrlUtil
- URL : /jw/js/json/util.js
- Auto included in all userview pages.
- Convenient method to deal with URL.
...
Code Block | ||
---|---|---|
| ||
var q1 = "name=joget&email=info@jogte.org&email=test@joget.org"; var q2 = "name=joget team&phone=012345678"; var queryString = UrlUtil.mergeRequestQueryString(q1, q2); console.log(queryString); // name=joget%20team&email=info%40joget%2Eorg&email=test%40joget%2Eorg&phone=012345678 |