Skip to content

Commit

Permalink
MINOR Renamed #sitetree_ul to .cms-tree in JavaScript logic (changed …
Browse files Browse the repository at this point in the history
…in LeftAndMain.ss base template)
  • Loading branch information
chillu committed Apr 28, 2011
1 parent 8bee7a1 commit d48f21a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion javascript/AssetAdmin.DragDrop.js
Expand Up @@ -10,7 +10,7 @@
$('.AssetTableField.dragdrop').entwine({
onmatch: function() {
var self = this;
$('#sitetree li').each(function() {
$('.cms-tree li').each(function() {
$(this).droppable({
greedy: true,
hoverClass: 'over', // same hover effect as normal tree
Expand Down
6 changes: 3 additions & 3 deletions javascript/AssetAdmin.js
Expand Up @@ -44,13 +44,13 @@
success: function() {
button.removeClass('loading');
// reload current form and tree
var currNode = $('#sitetree')[0].firstSelected();
var currNode = $('.cms-tree')[0].firstSelected();
if(currNode) {
var url = $(currNode).find('a').attr('href');
$('.cms-edit-form').loadForm(url);
}
$('#sitetree')[0].setCustomURL('admin/assets/getsubtree');
$('#sitetree')[0].reload({onSuccess: function() {
$('.cms-tree')[0].setCustomURL('admin/assets/getsubtree');
$('.cms-tree')[0].reload({onSuccess: function() {
// TODO Reset current tree node
}});
}
Expand Down
6 changes: 3 additions & 3 deletions javascript/CMSMain.js
Expand Up @@ -149,7 +149,7 @@
_reloadSitetree: function(params) {
var self = this;

$('#sitetree').search(
$('.cms-tree').search(
params,
function() {
self.find(':submit').attr('disabled', false).removeClass('loading');
Expand Down Expand Up @@ -184,7 +184,7 @@

// integrate with sitetree selection changes
// TODO Only trigger when report is visible
jQuery('#sitetree').bind('select_node.jstree', function(e, data) {
jQuery('.cms-tree').bind('select_node.jstree', function(e, data) {
var node = data.rslt.obj;
self.find(':input[name=ID]').val(node ? $(node).data('id') : null);
self.trigger('submit');
Expand Down Expand Up @@ -306,7 +306,7 @@
});

// integrate with sitetree selection changes
jQuery('#sitetree').bind('select_node.jstree', function(e, data) {
jQuery('.cms-tree').bind('select_node.jstree', function(e, data) {
var node = data.rslt.obj;
self.find(':input[name=ID]').val(node ? $(node).data('id') : null);
if(self.is(':visible')) self.trigger('submit');
Expand Down
4 changes: 2 additions & 2 deletions javascript/ReportAdmin.Tree.js
Expand Up @@ -4,11 +4,11 @@
(function($) {
$.entwine('ss', function($){
/**
* Class: #sitetree
* Class: .cms-tree
*
* Tree panel.
*/
$('#sitetree').entwine({
$('.cms-tree').entwine({
onmatch: function() {
// make sure current ID of loaded form is actually selected in tree
var id = $('.cms-edit-form :input[name=ID]').val();
Expand Down

0 comments on commit d48f21a

Please sign in to comment.