mirror of
https://github.com/myvesta/vesta
synced 2025-07-12 08:06:43 -07:00
js / index.html update set
This commit is contained in:
parent
6ceecb886e
commit
8155d2cd9c
5 changed files with 55 additions and 27 deletions
|
@ -89,16 +89,20 @@ App.Actions.save_form = function(evt) {
|
|||
|
||||
// do_action_edit
|
||||
App.Actions.edit = function(evt) {
|
||||
var elm = $(evt.target);
|
||||
elm = elm.hasClass('row') ? elm : elm.parents('.row');
|
||||
|
||||
var options = elm.find('.source').val();
|
||||
var build_method = App.Env.getWorldName() + '_form';
|
||||
var tpl = App.HTML.Build[build_method](options);
|
||||
elm.replaceWith(tpl);
|
||||
|
||||
App.Helpers.disbleNotEditable();
|
||||
//App.Helpers.updateScreen();
|
||||
if ('undefined' != typeof App.Pages[App.Env.world].edit) {
|
||||
App.Pages[App.Env.world].edit(evt);
|
||||
} else {
|
||||
var elm = $(evt.target);
|
||||
elm = elm.hasClass('row') ? elm : elm.parents('.row');
|
||||
|
||||
var options = elm.find('.source').val();
|
||||
var build_method = App.Env.getWorldName() + '_form';
|
||||
var tpl = App.HTML.Build[build_method](options);
|
||||
elm.replaceWith(tpl);
|
||||
|
||||
App.Helpers.disbleNotEditable();
|
||||
//App.Helpers.updateScreen();
|
||||
}
|
||||
}
|
||||
|
||||
// do_cancel_form
|
||||
|
@ -334,3 +338,16 @@ App.Actions.view_full_ns_list = function(evt)
|
|||
var elm = $(evt.target);
|
||||
App.Helpers.openInnerPopup(elm, $(elm).parents('.prop-box').find('.ns-full-list:first').html());
|
||||
}
|
||||
|
||||
App.Actions.view_template_info = function(evt)
|
||||
{
|
||||
var elm = $(evt.target);
|
||||
ref = elm.hasClass('row') ? elm : elm.parents('.row');
|
||||
|
||||
var options = ref.find('.source').val();
|
||||
App.Ajax.request('DNS.getTemplateInfo', {spell: options}, function(reply) {
|
||||
if (reply.result) {
|
||||
App.Helpers.openInnerPopup(elm, reply.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue