diff --git a/env/sunstone/public/js/user-plugins/apptools.appenv.js b/env/sunstone/public/js/user-plugins/apptools.appenv.js index d8b03de205..8c6b582a5d 100644 --- a/env/sunstone/public/js/user-plugins/apptools.appenv.js +++ b/env/sunstone/public/js/user-plugins/apptools.appenv.js @@ -104,7 +104,7 @@ var create_appenv_tmpl = '\ \
\ \ - \ \
\
\ @@ -618,6 +618,20 @@ function setupCreateAppEnvDialog(){ return false; }); + //Somehow this needs to go here. Live() doesn't respond in setup function + $('select#env_templates option').live("click", function(){ + var clicked = $(this).attr('clicked'); + if (clicked){//unbold, unmark + $(this).text($(this).text().replace(/☒/g,'☐')); + $(this).removeAttr('clicked'); + } + else {//bold,mark + $(this).text($(this).text().replace(/☐/g,'☒')); + $(this).attr('clicked','clicked'); + } + return false; + }); + /******** UNUSED $('#add_custom_var_appenv_button', dialog).click( function(){ @@ -702,20 +716,6 @@ function popUpCreateAppEnvDialog(){ $(this).text('☐ '+$(this).text()); }); - //Somehow this needs to go here. Live() doesn't respond in setup function - $('select[name="templates"] option', dialog).click(function(){ - var clicked = $(this).attr('clicked'); - if (clicked){//unbold, unmark - $(this).text($(this).text().replace(/☒/g,'☐')); - $(this).removeAttr('clicked'); - } - else {//bold,mark - $(this).text($(this).text().replace(/☐/g,'☒')); - $(this).attr('clicked','clicked'); - } - return false; - }); - dialog.dialog('open'); }