Commit 3ecc8d5918603e39b06b9a39660fc88c6e34538e
1 parent
5da7ce3b
PT:2492070 : updated JS.
Committed by: Jarrett Jordaan Reviewed by: Megan Watson
Showing
2 changed files
with
21 additions
and
20 deletions
dashboard.php
| ... | ... | @@ -147,6 +147,7 @@ class DashboardDispatcher extends KTStandardDispatcher { |
| 147 | 147 | // |
| 148 | 148 | function runFirstLoginWizard($oTemplate, $aTemplateData) { |
| 149 | 149 | $this->oPage->requireJSResource('thirdpartyjs/jquery/jquery-1.3.2.min.js'); |
| 150 | + $this->oPage->requireJSResource('thirdpartyjs/jquery/jquery_noconflict.js'); | |
| 150 | 151 | $this->oPage->requireJSResource('setup/wizard/resources/js/firstlogin.js'); |
| 151 | 152 | } |
| 152 | 153 | ... | ... |
setup/wizard/resources/js/firstlogin.js
| 1 | 1 | var win; |
| 2 | 2 | |
| 3 | -$(function() { // Document is ready | |
| 4 | - if($("#wrapper").attr('class') != 'wizard') {// Check if we in a wizard, or on the dashboard | |
| 3 | +jQuery(function() { // Document is ready | |
| 4 | + if(jQuery("#wrapper").attr('class') != 'wizard') {// Check if we in a wizard, or on the dashboard | |
| 5 | 5 | showForm(); // Display first login wizard |
| 6 | 6 | } |
| 7 | 7 | }); |
| ... | ... | @@ -16,8 +16,8 @@ function firstlogin(rootUrl, pluginHandle) { |
| 16 | 16 | |
| 17 | 17 | firstlogin.prototype.showFolderTemplateTree = function(templateId) { |
| 18 | 18 | this.hideFolderTemplateTrees(); |
| 19 | - $('#template_' + templateId).attr('style', 'display:block'); // Show template | |
| 20 | - $('#templates_' + templateId).attr('style', 'display:block'); // Show template nodes | |
| 19 | + jQuery('#template_' + templateId).attr('style', 'display:block'); // Show template | |
| 20 | + jQuery('#templates_' + templateId).attr('style', 'display:block'); // Show template nodes | |
| 21 | 21 | this.showFolderTemplateNodes(templateId); |
| 22 | 22 | } |
| 23 | 23 | |
| ... | ... | @@ -37,14 +37,14 @@ firstlogin.prototype.showFolderTemplateNodes = function(templateId) { |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | firstlogin.prototype.hideFolderTemplateTrees = function() { |
| 40 | - $('.templates').each( | |
| 40 | + jQuery('.templates').each( | |
| 41 | 41 | function() { |
| 42 | - $(this).attr('style', 'display:none'); | |
| 42 | + jQuery(this).attr('style', 'display:none'); | |
| 43 | 43 | } |
| 44 | 44 | ); |
| 45 | - $('.template_nodes').each( | |
| 45 | + jQuery('.template_nodes').each( | |
| 46 | 46 | function() { |
| 47 | - $(this).attr('style', 'display:none'); | |
| 47 | + jQuery(this).attr('style', 'display:none'); | |
| 48 | 48 | } |
| 49 | 49 | ); |
| 50 | 50 | } |
| ... | ... | @@ -74,21 +74,21 @@ var showForm = function() { |
| 74 | 74 | |
| 75 | 75 | var createForm = function() { |
| 76 | 76 | var holder = "<div id='firstlogin'></div>"; |
| 77 | - $("#pageBody").append(holder); // Append to current dashboard | |
| 77 | + jQuery("#pageBody").append(holder); // Append to current dashboard | |
| 78 | 78 | var address = "setup/firstlogin/index.php"; |
| 79 | 79 | getUrl(address, "firstlogin"); // Pull in existing wizard |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // Send request and update a div |
| 83 | 83 | var getUrl = function (address, div) { |
| 84 | - $.ajax({ | |
| 84 | + jQuery.ajax({ | |
| 85 | 85 | url: address, |
| 86 | 86 | dataType: "html", |
| 87 | 87 | type: "POST", |
| 88 | 88 | cache: false, |
| 89 | 89 | success: function(data) { |
| 90 | - $("#"+div).empty(); | |
| 91 | - $("#"+div).append(data); | |
| 90 | + jQuery("#"+div).empty(); | |
| 91 | + jQuery("#"+div).append(data); | |
| 92 | 92 | } |
| 93 | 93 | }); |
| 94 | 94 | } |
| ... | ... | @@ -98,9 +98,9 @@ var getUrl = function (address, div) { |
| 98 | 98 | */ |
| 99 | 99 | var closeFirstLogin = function () { |
| 100 | 100 | this.win.destroy(); |
| 101 | - $('.ext-el-mask').each( // TODO : Why does overlay hang around? | |
| 101 | + jQuery('.ext-el-mask').each( // TODO : Why does overlay hang around? | |
| 102 | 102 | function() { |
| 103 | - $(this).remove(); | |
| 103 | + jQuery(this).remove(); | |
| 104 | 104 | } |
| 105 | 105 | ); |
| 106 | 106 | |
| ... | ... | @@ -108,14 +108,14 @@ var closeFirstLogin = function () { |
| 108 | 108 | |
| 109 | 109 | // Node clicked |
| 110 | 110 | firstlogin.prototype.nodeAction = function(updateContentDiv, updateDiv, address) { |
| 111 | - var className = $("#"+updateDiv).attr('class'); | |
| 111 | + var className = jQuery("#"+updateDiv).attr('class'); | |
| 112 | 112 | state = className.split(' '); |
| 113 | 113 | if(state[2] == 'closed') { |
| 114 | 114 | getUrl(address, updateContentDiv); |
| 115 | - $("#"+updateDiv).attr('class', 'tree_icon tree_folder open'); // Replace the closed class name to open | |
| 115 | + jQuery("#"+updateDiv).attr('class', 'tree_icon tree_folder open'); // Replace the closed class name to open | |
| 116 | 116 | } else { |
| 117 | - $("#"+updateContentDiv).empty(); // Empty out that tree. | |
| 118 | - $("#"+updateDiv).attr('class', 'tree_icon tree_folder closed'); // Replace the opened class name to close | |
| 117 | + jQuery("#"+updateContentDiv).empty(); // Empty out that tree. | |
| 118 | + jQuery("#"+updateDiv).attr('class', 'tree_icon tree_folder closed'); // Replace the opened class name to close | |
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | 121 | |
| ... | ... | @@ -124,8 +124,8 @@ firstlogin.prototype.getRootUrl = function() { |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | firstlogin.prototype.sendFirstLoginForm = function() { |
| 127 | - var templateId = $("#selectedTemplate").val(); | |
| 128 | - var action = $("#step_name_templates").attr('action'); | |
| 127 | + var templateId = jQuery("#selectedTemplate").val(); | |
| 128 | + var action = jQuery("#step_name_templates").attr('action'); | |
| 129 | 129 | var address = this.rootUrl + "setup/firstlogin/" + action + "&templateId=" + templateId + "&Next=Next"; |
| 130 | 130 | getUrl(address, 'firstlogin'); |
| 131 | 131 | } | ... | ... |