MINOR Renamed #sitetree_ul to .cms-tree in JavaScript logic (changed in LeftAndMain.ss base template)

This commit is contained in:
Ingo Schommer 2011-04-17 20:04:46 +12:00
parent 8bee7a1290
commit d48f21afc0
4 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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
}});
}

View File

@ -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');
@ -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');
@ -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');

View File

@ -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();