forked from feincms/feincms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfrontend_editing.js
More file actions
40 lines (35 loc) · 1.34 KB
/
Copy pathfrontend_editing.js
File metadata and controls
40 lines (35 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
(function($){
$(function(){
feincms.fe_init_animations();
$("#fe_tools > a").live("click", function() {
var fe_box = $(this).parents('div.fe_box');
if (this.id == 'fe_tools_edit') {
res = fe_box.attr('id').match(/([^\-]+)-([^\-]+)-([^\-]+)-(\d+)-(\d+)/);
var base = feincms.admin_index + res[1] +"/"+ res[2];
window.open(base+"/"+res[4]+'|'+res[3]+'|'+res[5]+'/',
'fe_editor',
'height=500,width=800,resizable=yes,scrollbars=yes');
}
return false;
});
});
feincms.fe_init_animations = function() {
var fe_tools = $('#fe_tools');
$('.fe_box').hover(
function(){
$(this).css('background', '#e8e8ff').animate({'opacity': 1}, 100).append(fe_tools);
fe_tools.show();
},
function(){
$(this).animate({'opacity': 0.6}, 100).css('background', 'none');
fe_tools.hide();
}
);
};
feincms.fe_update_content = function(identifier, content) {
var region = $('#' + identifier);
region.animate({'opacity': 0}).html(content);
region.animate({'opacity': 1.5}).animate({'opacity': 0.6});
feincms.fe_init_animations();
};
})(feincms.jQuery);