From 75a3c4d5b13945a891cdf10d260a9bc59fab65f7 Mon Sep 17 00:00:00 2001 From: chris2tof Date: Mon, 5 Dec 2011 09:54:41 +0800 Subject: [PATCH] Modify assets Each layout has a manifest for css and js --- app/assets/javascripts/admin.js | 8 + app/assets/javascripts/application.js | 32 +- app/assets/javascripts/design.js | 73 ++- app/assets/javascripts/design_temp.js | 71 --- app/assets/javascripts/easy.js | 16 - app/assets/javascripts/page.js | 3 - app/assets/javascripts/side_bar_history.js | 26 + app/assets/javascripts/site_editor.js | 9 + app/assets/stylesheets/admin.css.erb | 362 +------------ app/assets/stylesheets/admin_back_end.css.erb | 354 ++++++++++++ app/assets/stylesheets/design.css | 16 +- app/assets/stylesheets/design_temp.css | 12 - app/assets/stylesheets/ie.css | 0 app/assets/stylesheets/main.css | 24 - app/assets/stylesheets/member.css.erb | 507 ------------------ app/assets/stylesheets/message.css | 11 + app/assets/stylesheets/messy.css.erb | 305 ----------- .../{content.css.erb => site_edition.css.erb} | 1 - app/assets/stylesheets/site_editor.css.erb | 8 + app/controllers/admin/items_controller.rb | 2 +- app/controllers/admin/links_controller.rb | 2 +- .../admin/page_parts_controller.rb | 2 +- app/controllers/admin/pages_controller.rb | 2 +- .../admin/user_attributes_controller.rb | 2 +- .../admin/user_info_models_controller.rb | 2 +- .../admin/user_role_models_controller.rb | 2 +- app/controllers/admin/users_controller.rb | 2 +- app/views/admin/designs/_form.html.erb | 5 +- .../admin/designs/_stylesheet_field.html.erb | 0 .../admin/user_attribute_models/edit.html.erb | 2 - .../user_attribute_models/index.html.erb | 2 - .../admin/user_attribute_models/new.html.erb | 2 - app/views/admin/users/_form.html.erb | 5 +- app/views/admin/users/edit.html.erb | 2 - app/views/admin/users/index.html.erb | 2 - app/views/admin/users/new.html.erb | 2 - app/views/admin/users/show.html.erb | 2 - app/views/layouts/admin.html.erb | 43 +- app/views/layouts/content.html.erb | 48 -- app/views/layouts/member.html.erb | 52 -- app/views/layouts/site_editor.html.erb | 36 ++ config/config.yml | 2 + 42 files changed, 571 insertions(+), 1488 deletions(-) create mode 100644 app/assets/javascripts/admin.js delete mode 100644 app/assets/javascripts/design_temp.js delete mode 100644 app/assets/javascripts/easy.js delete mode 100644 app/assets/javascripts/page.js create mode 100644 app/assets/javascripts/side_bar_history.js create mode 100644 app/assets/javascripts/site_editor.js create mode 100644 app/assets/stylesheets/admin_back_end.css.erb delete mode 100644 app/assets/stylesheets/design_temp.css delete mode 100644 app/assets/stylesheets/ie.css delete mode 100644 app/assets/stylesheets/main.css delete mode 100644 app/assets/stylesheets/member.css.erb create mode 100644 app/assets/stylesheets/message.css delete mode 100644 app/assets/stylesheets/messy.css.erb rename app/assets/stylesheets/{content.css.erb => site_edition.css.erb} (99%) create mode 100644 app/assets/stylesheets/site_editor.css.erb delete mode 100644 app/views/admin/designs/_stylesheet_field.html.erb delete mode 100644 app/views/layouts/content.html.erb delete mode 100644 app/views/layouts/member.html.erb create mode 100644 app/views/layouts/site_editor.html.erb diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js new file mode 100644 index 00000000..c97d2b1d --- /dev/null +++ b/app/assets/javascripts/admin.js @@ -0,0 +1,8 @@ +// This is a manifest file that'll be compiled into including all the files listed below. +// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +// be included in the compiled file accessible from http://example.com/assets/application.js +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// the compiled file. +// +//= require jquery +//= require jquery_ujs \ No newline at end of file diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index ecc46ce0..13d92690 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -6,34 +6,4 @@ // //= require jquery //= require jquery_ujs -//= require_tree . - -// Place your application-specific JavaScript functions and classes here -// This file is automatically included by javascript_include_tag :defaults - -$(function () { - $('#panel_sidebar a, #panel_main a.nav').live('click', - function () { - $.getScript(this.href); - history.pushState(null, document.title, this.href); - return false; - } - ); - - $('#panel_main a.reload').live('click', - function () { - $.getScript(this.href); - history.replaceState(null, document.title, this.href); - return false; - } - ); - - $('.form').live('submit', function () { - $.post(this.action, $(this).serialize(), null, 'script'); - return false; - }); - - $(window).bind("popstate", function () { - $.getScript(location.href); - }); -}); +//= require_tree . \ No newline at end of file diff --git a/app/assets/javascripts/design.js b/app/assets/javascripts/design.js index dee720fa..e67989c4 100644 --- a/app/assets/javascripts/design.js +++ b/app/assets/javascripts/design.js @@ -1,2 +1,71 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. +function r_editor(tgetUrl,tpostUrl,tfilename,toption){ + if(!toption){ toption =new Array();} + if(!toption['width']){toption['width']=400;} + if(!toption['height']){toption['height']=300;} + var editor = this; + editor.filename = tfilename; + editor.getUrl = tgetUrl; + editor.postUrl = tpostUrl; + editor.nodeToBeChanged="" + editor.width = toption['width']; + editor.height = toption['height']; + var html=''; + editor.init = function(){ + code = ""; + html = $(code); + html.children("textarea").load(editor.getUrl); + html.children("input.discard").click(function(){ + editor.destroy(); + }); + html.children("input.send").click(function(){ + editor.send(); + }); + return html; + }; + editor.reload = function(){ + $.get(editor.getUrl,function(data){ + html.children("textarea").text(data); + }); + }; + editor.send = function(){ + $.post(editor.postUrl,{filename:editor.filename,context:html.children("textarea").val(),authenticity_token:$('meta[name=csrf-token]').attr('content')},null,"script"); + }; + editor.destroy = function(){ + html.remove(); + }; +} + +$(".r_edit").live("click",function(){ + new_editor = new r_editor($(this).attr("path"),"edit_file",$(this).attr("filename")); + $(this).after(new_editor.init()); +}); + + +$(".r_snapshot").live({ + mouseenter: + function(){ + $(this).append($("").html('

')); + }, + mouseleave: + function(){ + $(this).find("span:last").remove(); + } + } +); + +$('input.multi_files').live("change", function(){ + $(this).parent().prev("ul").append("
  • " + $(this).val() + "
  • "); + new_node = $(this).parent().clone(); + $(this).parent().css("display","none"); + new_node.children('input.multi_files').val(""); + $(this).parent().before(new_node); +}); + +$('a.remove_mark').live("click",function(){ + $(this).prev("input").val("true"); + $(this).parent().css("text-decoration","line-through") + $(this).parent().removeClass("r_snapshot"); + $(this).next().remove(); + $(this).remove(); + return false; +}); \ No newline at end of file diff --git a/app/assets/javascripts/design_temp.js b/app/assets/javascripts/design_temp.js deleted file mode 100644 index 2c8ccb1c..00000000 --- a/app/assets/javascripts/design_temp.js +++ /dev/null @@ -1,71 +0,0 @@ -function r_editor(tgetUrl,tpostUrl,tfilename,toption){ - if(!toption){ toption =new Array();} - if(!toption['width']){toption['width']=400;} - if(!toption['height']){toption['height']=300;} - var editor = this; - editor.filename = tfilename; - editor.getUrl = tgetUrl; - editor.postUrl = tpostUrl; - editor.nodeToBeChanged="" - editor.width = toption['width']; - editor.height = toption['height']; - var html=''; - editor.init = function(){ - code = ""; - html = $(code); - html.children("textarea").load(editor.getUrl); - html.children("input.discard").click(function(){ - editor.destroy(); - }); - html.children("input.send").click(function(){ - editor.send(); - }); - return html; - }; - editor.reload = function(){ - $.get(editor.getUrl,function(data){ - html.children("textarea").text(data); - }); - }; - editor.send = function(){ - $.post(editor.postUrl,{filename:editor.filename,context:html.children("textarea").val(),authenticity_token:$('meta[name=csrf-token]').attr('content')},null,"script"); - }; - editor.destroy = function(){ - html.remove(); - }; -} - -$(".r_edit").live("click",function(){ - new_editor = new r_editor($(this).attr("path"),"edit_file",$(this).attr("filename")); - $(this).after(new_editor.init()); -}); - - -$(".r_snapshot").live({ - mouseenter: - function(){ - $(this).append($("").html('

    ')); - }, - mouseleave: - function(){ - $(this).find("span:last").remove(); - } - } -); - -$('input.multi_files').live("change", function(){ - $(this).parent().prev("ul").append("
  • " + $(this).val() + "
  • "); - new_node = $(this).parent().clone(); - $(this).parent().css("display","none"); - new_node.children('input.multi_files').val(""); - $(this).parent().before(new_node); -}); - -$('a.remove_mark').live("click",function(){ - $(this).prev("input").val("true"); - $(this).parent().css("text-decoration","line-through") - $(this).parent().removeClass("r_snapshot"); - $(this).next().remove(); - $(this).remove(); - return false; -}); diff --git a/app/assets/javascripts/easy.js b/app/assets/javascripts/easy.js deleted file mode 100644 index 85afd124..00000000 --- a/app/assets/javascripts/easy.js +++ /dev/null @@ -1,16 +0,0 @@ -/* -* -* Easy front-end framework -* -* Copyright (c) 2009 Alen Grakalic -* http://easyframework.com/license.php -* -* supported by Templatica (http://templatica.com) -* and Css Globe (http://cssglobe.com) -* -* built to be used with jQuery library -* http://jquery.com -* -*/ - -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(8($){$.1Y={2S:8(3){6 g={j:\'#2T 2U\',1x:\'2V\'};b(F 3==\'G\')g.j=3;6 3=$.H(g,3);s $(3.j).q(8(){$(4).1Z(8(){$(\'20:21\',4).15(Q);$(\'a:21\',4).1f(3.1x)},8(){$(\'20\',4).V();$(\'a\',4).1g(3.1x)})})},22:8(3){6 g={j:\'.22\',17:10,1y:25,23:1h,o:\'2W\',f:\'\',1z:\'\'};b(F 3==\'G\')g.j=3;6 3=$.H(g,3);6 f;s $(3.j).q(8(){6 p=$(4).l(\'p\');$(4).1Z(8(e){f=(3.f!=\'\')?3.f:p;f=(3.1z!=\'\')?$(\'#\'+3.1z).24():f;$(4).l(\'p\',\'\');b(f!=\'\'&&f!=2X){$(\'W\').26(\'\'+f+\'\');$(\'#\'+3.o).m({\'X\':\'18\',\'1A\':\'1B\'}).m(\'t\',(e.27-3.1y)+\'J\').m(\'y\',(e.1i+3.17)+\'J\').15(\'28\')}},8(){$(\'#\'+3.o).A();$(4).l(\'p\',p)});$(4).2Y(8(e){6 x=((e.1i+3.17+$(4).r())<$(K).r())?(e.1i+3.17):(e.1i-3.17-$(4).r()-16);$(\'#\'+3.o).m(\'t\',(e.27-3.1y)+\'J\').m(\'y\',(x+\'J\'))});b(3.23){$(4).2Z(8(e){$(\'#\'+3.o).A();$(4).l(\'p\',p)})}})},29:8(3){6 g={j:\'.29\',k:\'30\',2a:\'31...\',2b:\'32 33 34 a 35 36 37 38, 39 19 3a 4 K 3b 3c 3d.\',2c:\'3e\'};b(F 3==\'G\')g.j=3;6 3=$.H(g,3);s $(3.j).q(8(){$(4).19(8(e){e.3f();b($.1a.2d)$.3g.2e=R;6 1j=$.1a.3h&&$.1a.2f.2g(0,1)<7;6 2h=$.1a.2d&&$.1a.2f<=9.5;6 w=$(K).r();6 h=$(2i).B();6 2j=$(K).r()/2;6 2k=$(K).B()/2;L=8(){$(\'#\'+3.k+\'1k\').A();b(Y!=0)$(\'#\'+3.k+\'f\').m(\'r\',Y+\'J\');b(Z!=0)$(\'#\'+3.k+\'f\').m(\'B\',Z+\'J\');1C($(\'#\'+3.k+\'f\'));$(\'11\',\'#\'+3.k+\'f\').m(\'1l\',\'1D\')};1C=8(c){$(c).m({\'3i\':\'3j\',\'2l\':\'#2m\',\'2n\':\'#3k\',\'u-3l\':\'y\',\'2o\':\'y\',\'X\':\'3m\',\'z-2p\':\'3n\',\'1D\':\'1m\'});6 y=2j-$(c).r()/2;6 t=2k-$(c).B()/2;$(c).m({\'y\':y,\'t\':t,\'1A\':\'1B\'}).15(\'1E\');b(1j)$(c).m({\'X\':\'18\',\'t\':(t+$(K).1F())+\'J\'});b(2h)$(c).m({\'X\':\'18\',\'t\':(2i.W[\'3o\']/2-$(c).B()/2+$(K).1F())+\'J\'})};b(1j)$(\'1n, 1o, 2q\').m(\'1l\',\'1m\');C=8(){$(\'#\'+3.k+\'f\').u(3.2b);L()};A=8(){$(\'#\'+3.k).A();$(\'#\'+3.k+\'f\').A();$(\'#\'+3.k+\'1k\').A();b(1j)$(\'1n, 1o, 2q\').m(\'1l\',\'1D\')};$(\'\').M(\'W\').m({\'r\':w,\'B\':h,\'2l\':\'#3p\',\'X\':\'18\',\'t\':\'0\',\'y\':\'0\',\'z-2p\':\'3q\',\'2e\':.7}).19(8(){A()});6 n=$(4).l(\'n\');6 12=n.2g(n.3r(\'.\')).1G();6 f;6 Y=0;6 Z=0;6 1b=1h;$(\'\'+3.2a+\'\').M(\'W\');1C($(\'#\'+3.k+\'1k\'));$(\'\').M(\'W\');b($(4).13(\'1p\')){6 1p=\'<1o r="Q%" B="Q%"><1H 1I="2r" 1J="R" /><1H 1I="2s" 1J="2t" /><1H 1I="3s" 1J="\'+n+\'" /><1n 1K="\'+n+\'" 1L="3t/x-3u-1p" 2r="R" 2s="2t" r="Q%" B="Q%">\';$(1p).M(\'#\'+3.k+\'f\');Y=3v;Z=3w;1b=R}E{b(12==\'.3x\'||12==\'.3y\'||12==\'.3z\'||12==\'.3A\'||12==\'.3B\'){6 11=1M 3C();$(11).C(8(){C()}).m(\'1l\',\'1m\').M(\'#\'+3.k+\'f\');11.2u=8(){L();11.2u=8(){}};11.1K=n+\'?\'+(1M 2v()).2w()+\' =\'+(1M 2v()).2w()}E b(n.3D(0)==\'#\'){$(n).3E().1g(\'1m\').L().M(\'#\'+3.k+\'f\');$.1Y.2x(\'#\'+3.k+\'f 2y\');1b=R}E{$(\'<3F 3G="0" 3H="3I" 3J="r:Q%;B:Q%" 1K="\'+n+\'" />\').M(\'#\'+3.k+\'f\');Y=3K;Z=3L;1b=R}};6 T=$(4).l(\'T\').1N(\';\');$.q(T,8(i){b(T[i].1q(\'r\')!=-1)Y=T[i].1N(\':\')[1];b(T[i].1q(\'B\')!=-1)Z=T[i].1N(\':\')[1]});b(1b)L();$(\'<1O>\'+3.2c+\'\').M(\'#\'+3.k+\'f\').m({\'X\':\'18\',\'2o\':\'y\',\'y\':\'0\',\'t\':\'-3M\',\'2n\':\'#2m\',\'2z\':\'2A\'});$(\'#\'+3.k+\', #\'+3.k+\'f 1O\').19(8(){A()})})})},2B:8(3){6 g={j:\'a\'};b(F 3==\'G\')g.j=3;6 3=$.H(g,3);6 1c=K.3N.1c;1c=1c.3O(\'3P.\',\'\').1G();s $(3.j).q(8(){6 n=$(4).l(\'n\').1G();b(n.1q(\'2C://\')!=-1&&n.1q(1c)==-1){$(4).l(\'v\',\'3Q\');$(4).1f(\'2B\')}})},2D:8(3){6 g={j:\'.2D\',2E:3R,2F:1h};b(F 3==\'G\')g.j=3;6 3=$.H(g,3);s $(3.j).q(8(){6 c=$(4);6 1r=$(c).2G().1r;6 U=0;8 1P(){6 14=2H.3S(2H.3T()*1r)+1;s 14};8 L(){b(3.2F){6 14=1P();3U(14==U){14=1P()};U=14}E{U=(U==1r)?1:U+1};$(c).2G().V();$(\':3V-3W(\'+U+\')\',c).15(\'3X\')};L();3Y(L,3.2E)})},2I:8(3){6 g={j:\'a.2I\',3Z:1E};b(F 3==\'G\')g.j=3;6 3=$.H(g,3);s $(3.j).19(8(){6 v=$($(4).l(\'n\'));6 1Q=$(v).1Q().t;$(\'24,W\').40({1F:1Q},1E,\'41\')})},42:8(3){6 g={j:\'.2J\'};b(F 3==\'G\')g.j=3;6 3=$.H(g,3);s $(3.j).q(8(){6 v;b($(4).13(\'2K\')){v=$(4).2K().V()}E b($(4).13(\'o\')){v=$(4).l(\'n\');v=$(v).V()}E{v=$(4).43().V()};$(4).m(\'2z\',\'2A\');$(4).2J(8(){$(4).1f(\'2L\');$(v).44()},8(){$(v).45();$(4).1g(\'2L\')})})},2x:8(3){6 g={j:\'2y\',N:\'46 1s O\',2M:\'47 1R 48 1s O\',2N:\'49 1s O\',2O:\'4a 4b 1s O\',1t:\'4c\'};8 1u(c){b($(c).D()==\'\'||1S(c)){6 P=($(c).l(\'p\')!=\'\')?$(c).l(\'p\'):3.N;C(c,P)}};8 1v(c,1L){6 1d,N;4d(1L){2P\'1T\':1d=/(4e|2C|4f):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/;N=3.2N;2Q;2P\'1U\':6 1d=/[\\d\\4g-]/;N=3.2O;2Q;4h:1d=/^[^@]+@[^@]+.[a-z]{2,}$/;N=3.2M};6 D=$(c).D();b(D.4i(1d)==-1||1S(c)){6 P=($(c).l(\'p\')!=\'\')?$(c).l(\'p\'):N;C(c,P)}};8 1S(c){6 u=$(\'1e[1V=\'+$(c).l(\'o\')+\']\').u();s(u==$(c).D())};8 C(c,P){6 1w=$(c).1w();1w.26(\'<1W 4j="C">\'+P+\'\');$(\'1W.C\',1w).V().15(\'28\');$(c).1f(3.1t);1X=1h};$(\'4k.1e,2R.1e\').q(8(){6 u=$(\'1e[1V=\'+$(4).l(\'o\')+\']\').u();$(\'1e[1V=\'+$(4).l(\'o\')+\']\').m(\'1A\',\'1B\');$(4).D(u);$(4).4l(8(){b($(4).D()==u)$(4).D(\'\')});$(4).4m(8(){b($(4).D()==\'\')$(4).D(u)})});b(F 3==\'G\')g.j=3;6 3=$.H(g,3);s $(3.j).q(8(){$(4).4n(8(){$(\'.C\',4).A();$(\'.\'+3.1t,4).1g(3.1t);1X=R;$(\':u.O\',4).q(8(){b($(4).13(\'1R\')){1v(4,\'1R\')}E b($(4).13(\'1T\')){1v(4,\'1T\')}E b($(4).13(\'1U\')){1v(4,\'1U\')}E{1u(4)}});$(\':4o.O\',4).q(8(){1u(4)});$(\'2R.O\',4).q(8(){1u(4)});$(\':4p.O\',4).q(8(){b(!$(4).l(\'4q\')){6 P=($(4).l(\'p\')!=\'\')?$(4).l(\'p\'):3.N;C(4,P)}});s 1X})})}}})(4r);',62,276,'|||options|this||var||function|||if|obj|||content|defaults|||selector|popupId|attr|css|href|id|title|each|width|return|top|text|target|||left||remove|height|error|val|else|typeof|string|extend|div|px|window|show|appendTo|err|required|errormsg|100|true||rel|temp|hide|body|position|cw|ch||img|extension|hasClass|ran|fadeIn||xOffset|absolute|click|browser|showOk|hostname|regEx|label|addClass|removeClass|false|pageX|ie6|preloader|visibility|hidden|embed|object|flash|indexOf|length|is|notValidClass|check|checkRegEx|parent|className|yOffset|useElement|display|none|set|visible|1000|scrollTop|toLowerCase|param|name|value|src|type|new|split|small|getRan|offset|email|checkLabel|url|phone|for|span|valid|easy|hover|ul|first|tooltip|clickRemove|html||append|pageY|fast|popup|preloadText|errorText|closeText|opera|opacity|version|substr|opera95|document|w2|h2|background|fff|color|float|index|select|allowfullscreen|allowscriptaccess|always|onload|Date|getTime|forms|form|cursor|pointer|external|http|rotate|pause|randomize|children|Math|jump|toggle|prev|expanded|errEmail|errUrl|errPhone|case|break|textarea|navigation|nav|li|over|easy_tooltip|undefined|mousemove|mousedown|easy_popup|Loading|There|has|been|problem|with|your|request|please|outside|to|close|it|Close|preventDefault|support|msie|padding|10px|333|align|fixed|10001|clientHeight|000|10000|lastIndexOf|movie|application|shockwave|600|400|jpg|jpeg|gif|png|bmp|Image|charAt|clone|iframe|frameborder|scrolling|auto|style|900|500|24px|location|replace|www|_blank|5000|floor|random|while|nth|child|slow|setInterval|speed|animate|linear|showhide|next|slideDown|slideUp|This|Valid|address|URL|Phone|number|notvalid|switch|ftp|https|s_|default|search|class|input|focus|blur|submit|password|checkbox|checked|jQuery'.split('|'),0,{})) \ No newline at end of file diff --git a/app/assets/javascripts/page.js b/app/assets/javascripts/page.js deleted file mode 100644 index 4b413ddf..00000000 --- a/app/assets/javascripts/page.js +++ /dev/null @@ -1,3 +0,0 @@ -$("#page_design_id").live('change', function() { - $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_themes'); -}); \ No newline at end of file diff --git a/app/assets/javascripts/side_bar_history.js b/app/assets/javascripts/side_bar_history.js new file mode 100644 index 00000000..64c82458 --- /dev/null +++ b/app/assets/javascripts/side_bar_history.js @@ -0,0 +1,26 @@ +$(function () { + $('#panel_sidebar a, #panel_main a.nav').live('click', + function () { + $.getScript(this.href); + history.pushState(null, document.title, this.href); + return false; + } + ); + + $('#panel_main a.reload').live('click', + function () { + $.getScript(this.href); + history.replaceState(null, document.title, this.href); + return false; + } + ); + + $('.form').live('submit', function () { + $.post(this.action, $(this).serialize(), null, 'script'); + return false; + }); + + $(window).bind("popstate", function () { + $.getScript(location.href); + }); +}); \ No newline at end of file diff --git a/app/assets/javascripts/site_editor.js b/app/assets/javascripts/site_editor.js new file mode 100644 index 00000000..835884d0 --- /dev/null +++ b/app/assets/javascripts/site_editor.js @@ -0,0 +1,9 @@ +// This is a manifest file that'll be compiled into including all the files listed below. +// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +// be included in the compiled file accessible from http://example.com/assets/application.js +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// the compiled file. +// +//= require jquery +//= require jquery_ujs +//= require side_bar_history \ No newline at end of file diff --git a/app/assets/stylesheets/admin.css.erb b/app/assets/stylesheets/admin.css.erb index 8b5531aa..7322013b 100644 --- a/app/assets/stylesheets/admin.css.erb +++ b/app/assets/stylesheets/admin.css.erb @@ -1,354 +1,8 @@ -html, body{ - height: 100%; - margin: 0; - padding: 0; -} -html{ - background: url(<%= asset_path "body.jpg" %>) no-repeat scroll 0 0 transparent; - background-size: cover; -} - -body{ - color: #000000; - font-family: helvetica,arial,sans-serif; - margin: 0; - padding: 0; -} - -#panel_banner_link{ - background: url(<%= asset_path "orbitbar1.png" %>) repeat-x scroll 0 0; - height: 52px; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.hmenu{ - height: 40px; - position: absolute; - right: 0; - top: 1px; - width: 250px; -} - - -#orbit{ - background: url(<%= asset_path "bar_orbit.png" %>) no-repeat scroll 0 0 transparent; - cursor:pointer; - height: 43px; - left: 10px; - position: relative; - width: 41px; -} - -#orbit:hover{ - background-position:0 -43px; - box-shadow: 0 3px 3px #000000; -} -#orbit:hover #orblist{ - display:block; -} -#orblist{ - background: none repeat scroll 0 0 #FFFFFF; - border-radius: 0 3px 3px 3px; - box-shadow: 0 3px 3px #000000; - display: none; - margin: 0; - padding: 10px; - position: absolute; - top: 43px; - width: 130px; -} -#orblist li{ - border-bottom:1px solid #aaa; - list-style:none; -} -.orblink{ - color: #333333; - display: block; - font: 12px/100% arial,sans-serif; - padding: 5px; - text-decoration: none; -} -.orblink:hover{ - background:#eee; - color:#333; -} - -#log_out a{ - background: url(<%= asset_path "service_btn.png" %>) no-repeat scroll right 0 transparent; - border: medium none !important; - display: block !important; - height: 40px !important; - line-height: normal !important; - padding: 0 !important; - position: absolute; - right: 0px; - text-indent: -10000px; - top: 0px; - width: 43px !important; -} -#log_out a:hover{ - background: url(<%= asset_path "service_btn.png" %>) no-repeat scroll right bottom transparent !important; -} -.lang{ - color: #FFFFFF; - font-size: 15px; - line-height: 40px; - position: absolute; - right: 55px; - top: 0; -} - -.lang a{ - color:#fff; - text-decoration:none; -} - -.lang a:hover{ - text-decoration:underline; -} - -#panel_container{ - height: 100%; -} - -#panel_container h1{ - color: #FFFFFF; - font: 32px/100% helvetica,arial,sans-serif; - margin: 0 0 20px; - padding: 0; - text-shadow: 0 0 5px #000000; -} - -#panel_header{ - background: none repeat scroll 0 0 #F1F1F1; - border-bottom: 1px solid #818181; - padding: 10px; -} -#panel_header :after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} -#panel_header #nav{ - margin:0; - padding:0; - width:100%; -} - -#panel_header #nav li{ - float: left; - list-style: none outside none; -} - -#panel_header #nav li a{ - background: none repeat scroll 0 0 #fff; - border-radius: 13px 13px 13px 13px; - border: 1px solid #D6D6D6; - color: #000000; - float: left; - font-size:15px; - margin: 0 20px 0 0; - padding: 5px 10px; - text-decoration: none; -} - -#panel_header #nav li a:hover{ - background: none repeat scroll 0 0 #818181; - border-radius: 13px 13px 13px 13px; - color: #fff; -} - -#panel_content{ - height: 100%; -} - -.main{ - float: left; - height: 100%; - padding: 0 1%; - width: 81%; -} -.main2{ - padding: 62px 0 0; -} -.main table{ - border-collapse: collapse; - width:100%; -} -.main table th{ - border-bottom: 1px solid #222222; - color: #FFFFFF; - font: 20px/100% helvetica,arial,sans-serif; - letter-spacing: 0.05em; - padding: 10px; - text-shadow: 0 0 3px #000000; -} -.main table td{ - background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5); - border-bottom: 1px solid #222222; - color: #FFFFFF; - padding: 10px; - text-align: center; -} - -.main table td a{ - background: none repeat scroll 0 0 #FFFFFF; - border-radius: 5px 5px 5px 5px; - color: #000000; - padding: 5px; - text-decoration: none; -} - -.main table td a:hover{ - background: none repeat scroll 0 0 #eee; - border-radius: 5px 5px 5px 5px; - color: #333; -} -.secondary{ - background: none repeat scroll 0 0 rgba(0, 0, 0, 0.75); - box-shadow: 3px 0 3px #000000; - float: left; - height: 100%; - padding: 0 1%; - width: 14%; -} -.secondary2{ - padding: 62px 0 0; -} -.secondary ul{ - margin: 0; - padding: 0; -} -.secondary ul li{ - list-style:none; -} -.secondary ul li a{ - border-bottom: 1px solid #333; - color: #AAAAAA; - display: block; - padding: 14px 0; - text-align: left; - text-decoration: none; -} -.seclink1{ - background: url(<%= asset_path "icon1.png" %>) no-repeat scroll 20px 8px transparent; - border-bottom: 1px solid #333; - color: #AAAAAA; - display: block; - padding: 14px 0 14px 60px !important; - text-align: left; - text-decoration: none; -} -.seclink2{ - background: url(<%= asset_path "icon2.png" %>) no-repeat scroll 20px 14px transparent; - border-bottom: 1px solid #333; - color: #AAAAAA; - display: block; - padding: 14px 0 14px 60px !important; - text-align: left; - text-decoration: none; -} -.secondary ul li a:hover{ - color: #fff; -} - -#panel_footer{ - background: none repeat scroll 0 0 #FFFFFF; - display:none; - clear: both; - padding: 10px; -} -#panel_footer p{ - margin:0; -} -label{ - color: #FFFFFF; - display: block; - text-shadow: 0 0 5px #000000; - width: 130px; -} -p{ - margin:0 0 10px; -} -#panel_main p label{ - float: left; - padding: 3px; - width: 100px; -} -#panel_main .translation_missing{ - float: left; - padding: 3px; - width: 100px; - -} -.text{ - border: 1px solid #818181; - border-radius: 3px 3px 3px 3px; - font: 12px/100% helvetica,arial,sans-serif; - padding: 3px; - width: 205px; -} - -#site_info{ - background: none repeat scroll 0 0 #FFFFFF; - border-radius: 5px 5px 5px 5px; - box-shadow: 0 0 5px #000000; -/* height: 289px;*/ - margin: 0 0 20px; - overflow: hidden; - width: 600px; -} -#siteinfo_title{ - background: none repeat scroll 0 0 #333333; - color: #FFFFFF; - font: 24px/50px arial,sans-serif; - height: 50px; - margin: 0; - padding: 0 0 0 20px; - text-shadow: 0 1px 0 #000000; -} -#siteinfo_tb{ - background: none repeat scroll 0 0 #FFFFFF; -} -#siteinfo_tb td{ - background: none repeat scroll 0 0 transparent; - border-bottom: 1px solid #333333; - color: #333333; -} - -.buy_btn{ - float:left; - margin: 0 10px 0 0; -} -.main table td .buy_btn a{ - background: url("/assets/buy_btn.png") no-repeat scroll 0 0 transparent; - color: #000000; - display: block; - font-size: 22px; - height: 37px; - line-height: 37px; - text-align: center; - text-decoration: none; - text-shadow: 0 1px 0 #FFFFFF; - width: 170px; - padding: 0px; -} -.buy_btn a:hover{ - background-position:0 bottom; -} -.bought_btn{ - background: url("/assets/bought_btn.png") no-repeat scroll 0 0 transparent; - color: #FFFFFF; - float:left; - font-size: 22px; - height: 37px; - line-height: 37px; - margin: 0 10px 0 0; - text-align: center; - text-shadow: 0 1px 0 #C06408; - width: 170px; -} \ No newline at end of file +/* + *This is a manifest file that'll automatically include all the stylesheets available in this directory + *and any sub-directories. You're free to add application-wide styles to this file and they'll appear at + *the top of the compiled file, but it's generally better to create a new file per style scope. + *= require_self + *= require message + *= require admin_back_end +*/ \ No newline at end of file diff --git a/app/assets/stylesheets/admin_back_end.css.erb b/app/assets/stylesheets/admin_back_end.css.erb new file mode 100644 index 00000000..8b5531aa --- /dev/null +++ b/app/assets/stylesheets/admin_back_end.css.erb @@ -0,0 +1,354 @@ +html, body{ + height: 100%; + margin: 0; + padding: 0; +} +html{ + background: url(<%= asset_path "body.jpg" %>) no-repeat scroll 0 0 transparent; + background-size: cover; +} + +body{ + color: #000000; + font-family: helvetica,arial,sans-serif; + margin: 0; + padding: 0; +} + +#panel_banner_link{ + background: url(<%= asset_path "orbitbar1.png" %>) repeat-x scroll 0 0; + height: 52px; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.hmenu{ + height: 40px; + position: absolute; + right: 0; + top: 1px; + width: 250px; +} + + +#orbit{ + background: url(<%= asset_path "bar_orbit.png" %>) no-repeat scroll 0 0 transparent; + cursor:pointer; + height: 43px; + left: 10px; + position: relative; + width: 41px; +} + +#orbit:hover{ + background-position:0 -43px; + box-shadow: 0 3px 3px #000000; +} +#orbit:hover #orblist{ + display:block; +} +#orblist{ + background: none repeat scroll 0 0 #FFFFFF; + border-radius: 0 3px 3px 3px; + box-shadow: 0 3px 3px #000000; + display: none; + margin: 0; + padding: 10px; + position: absolute; + top: 43px; + width: 130px; +} +#orblist li{ + border-bottom:1px solid #aaa; + list-style:none; +} +.orblink{ + color: #333333; + display: block; + font: 12px/100% arial,sans-serif; + padding: 5px; + text-decoration: none; +} +.orblink:hover{ + background:#eee; + color:#333; +} + +#log_out a{ + background: url(<%= asset_path "service_btn.png" %>) no-repeat scroll right 0 transparent; + border: medium none !important; + display: block !important; + height: 40px !important; + line-height: normal !important; + padding: 0 !important; + position: absolute; + right: 0px; + text-indent: -10000px; + top: 0px; + width: 43px !important; +} +#log_out a:hover{ + background: url(<%= asset_path "service_btn.png" %>) no-repeat scroll right bottom transparent !important; +} +.lang{ + color: #FFFFFF; + font-size: 15px; + line-height: 40px; + position: absolute; + right: 55px; + top: 0; +} + +.lang a{ + color:#fff; + text-decoration:none; +} + +.lang a:hover{ + text-decoration:underline; +} + +#panel_container{ + height: 100%; +} + +#panel_container h1{ + color: #FFFFFF; + font: 32px/100% helvetica,arial,sans-serif; + margin: 0 0 20px; + padding: 0; + text-shadow: 0 0 5px #000000; +} + +#panel_header{ + background: none repeat scroll 0 0 #F1F1F1; + border-bottom: 1px solid #818181; + padding: 10px; +} +#panel_header :after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} +#panel_header #nav{ + margin:0; + padding:0; + width:100%; +} + +#panel_header #nav li{ + float: left; + list-style: none outside none; +} + +#panel_header #nav li a{ + background: none repeat scroll 0 0 #fff; + border-radius: 13px 13px 13px 13px; + border: 1px solid #D6D6D6; + color: #000000; + float: left; + font-size:15px; + margin: 0 20px 0 0; + padding: 5px 10px; + text-decoration: none; +} + +#panel_header #nav li a:hover{ + background: none repeat scroll 0 0 #818181; + border-radius: 13px 13px 13px 13px; + color: #fff; +} + +#panel_content{ + height: 100%; +} + +.main{ + float: left; + height: 100%; + padding: 0 1%; + width: 81%; +} +.main2{ + padding: 62px 0 0; +} +.main table{ + border-collapse: collapse; + width:100%; +} +.main table th{ + border-bottom: 1px solid #222222; + color: #FFFFFF; + font: 20px/100% helvetica,arial,sans-serif; + letter-spacing: 0.05em; + padding: 10px; + text-shadow: 0 0 3px #000000; +} +.main table td{ + background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5); + border-bottom: 1px solid #222222; + color: #FFFFFF; + padding: 10px; + text-align: center; +} + +.main table td a{ + background: none repeat scroll 0 0 #FFFFFF; + border-radius: 5px 5px 5px 5px; + color: #000000; + padding: 5px; + text-decoration: none; +} + +.main table td a:hover{ + background: none repeat scroll 0 0 #eee; + border-radius: 5px 5px 5px 5px; + color: #333; +} +.secondary{ + background: none repeat scroll 0 0 rgba(0, 0, 0, 0.75); + box-shadow: 3px 0 3px #000000; + float: left; + height: 100%; + padding: 0 1%; + width: 14%; +} +.secondary2{ + padding: 62px 0 0; +} +.secondary ul{ + margin: 0; + padding: 0; +} +.secondary ul li{ + list-style:none; +} +.secondary ul li a{ + border-bottom: 1px solid #333; + color: #AAAAAA; + display: block; + padding: 14px 0; + text-align: left; + text-decoration: none; +} +.seclink1{ + background: url(<%= asset_path "icon1.png" %>) no-repeat scroll 20px 8px transparent; + border-bottom: 1px solid #333; + color: #AAAAAA; + display: block; + padding: 14px 0 14px 60px !important; + text-align: left; + text-decoration: none; +} +.seclink2{ + background: url(<%= asset_path "icon2.png" %>) no-repeat scroll 20px 14px transparent; + border-bottom: 1px solid #333; + color: #AAAAAA; + display: block; + padding: 14px 0 14px 60px !important; + text-align: left; + text-decoration: none; +} +.secondary ul li a:hover{ + color: #fff; +} + +#panel_footer{ + background: none repeat scroll 0 0 #FFFFFF; + display:none; + clear: both; + padding: 10px; +} +#panel_footer p{ + margin:0; +} +label{ + color: #FFFFFF; + display: block; + text-shadow: 0 0 5px #000000; + width: 130px; +} +p{ + margin:0 0 10px; +} +#panel_main p label{ + float: left; + padding: 3px; + width: 100px; +} +#panel_main .translation_missing{ + float: left; + padding: 3px; + width: 100px; + +} +.text{ + border: 1px solid #818181; + border-radius: 3px 3px 3px 3px; + font: 12px/100% helvetica,arial,sans-serif; + padding: 3px; + width: 205px; +} + +#site_info{ + background: none repeat scroll 0 0 #FFFFFF; + border-radius: 5px 5px 5px 5px; + box-shadow: 0 0 5px #000000; +/* height: 289px;*/ + margin: 0 0 20px; + overflow: hidden; + width: 600px; +} +#siteinfo_title{ + background: none repeat scroll 0 0 #333333; + color: #FFFFFF; + font: 24px/50px arial,sans-serif; + height: 50px; + margin: 0; + padding: 0 0 0 20px; + text-shadow: 0 1px 0 #000000; +} +#siteinfo_tb{ + background: none repeat scroll 0 0 #FFFFFF; +} +#siteinfo_tb td{ + background: none repeat scroll 0 0 transparent; + border-bottom: 1px solid #333333; + color: #333333; +} + +.buy_btn{ + float:left; + margin: 0 10px 0 0; +} +.main table td .buy_btn a{ + background: url("/assets/buy_btn.png") no-repeat scroll 0 0 transparent; + color: #000000; + display: block; + font-size: 22px; + height: 37px; + line-height: 37px; + text-align: center; + text-decoration: none; + text-shadow: 0 1px 0 #FFFFFF; + width: 170px; + padding: 0px; +} +.buy_btn a:hover{ + background-position:0 bottom; +} +.bought_btn{ + background: url("/assets/bought_btn.png") no-repeat scroll 0 0 transparent; + color: #FFFFFF; + float:left; + font-size: 22px; + height: 37px; + line-height: 37px; + margin: 0 10px 0 0; + text-align: center; + text-shadow: 0 1px 0 #C06408; + width: 170px; +} \ No newline at end of file diff --git a/app/assets/stylesheets/design.css b/app/assets/stylesheets/design.css index afad32db..27f87400 100644 --- a/app/assets/stylesheets/design.css +++ b/app/assets/stylesheets/design.css @@ -1,4 +1,12 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ +.z-preview * { + width: 100%; + height: 100%; +} +.z-preview { + background: white; + border: solid; + position: absolute; + width: 200px; + float: right; + height: 200px; +} diff --git a/app/assets/stylesheets/design_temp.css b/app/assets/stylesheets/design_temp.css deleted file mode 100644 index 27f87400..00000000 --- a/app/assets/stylesheets/design_temp.css +++ /dev/null @@ -1,12 +0,0 @@ -.z-preview * { - width: 100%; - height: 100%; -} -.z-preview { - background: white; - border: solid; - position: absolute; - width: 200px; - float: right; - height: 200px; -} diff --git a/app/assets/stylesheets/ie.css b/app/assets/stylesheets/ie.css deleted file mode 100644 index e69de29b..00000000 diff --git a/app/assets/stylesheets/main.css b/app/assets/stylesheets/main.css deleted file mode 100644 index e6a5601f..00000000 --- a/app/assets/stylesheets/main.css +++ /dev/null @@ -1,24 +0,0 @@ -ul.list{ - margin:1em 0; - padding:0; - border-top:1px solid #ccc; - width:200px; - } -ul.list li{ - margin:0; - padding:.5em 0; - list-style:none; - border-bottom:1px solid #ccc; - } - -.error{ - color:red; - } - -.notice, .message{ - color:green; - } - -.warning{ - color:orange; - } diff --git a/app/assets/stylesheets/member.css.erb b/app/assets/stylesheets/member.css.erb deleted file mode 100644 index 05b66b0f..00000000 --- a/app/assets/stylesheets/member.css.erb +++ /dev/null @@ -1,507 +0,0 @@ -/* - *This is a manifest file that'll automatically include all the stylesheets available in this directory - *and any sub-directories. You're free to add application-wide styles to this file and they'll appear at - *the top of the compiled file, but it's generally better to create a new file per style scope. - *= require_self - -*/ -a, a:hover { - text-decoration: none; - outline:none; -} -html,body { - height:100%; - margin:0; - font-family: Helvetica, '微軟正黑體'; - overflow-x:hidden -} -ul { - list-style:none; - list-style-image:none; - margin:0; - padding:0; -} -.info_input input{ - border:none; - padding:5px; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; -} -input:focus, select:focus, textarea:focus { - outline:none; - -moz-outline-radius: 0; -} -.clear:after { - content:"."; - clear:both; - height:0; - display:block; - visibility:hidden; -} -#content{ - height:100%; -} -#sidebar { - position:fixed; - top:0; - left:0; - height: 100%; - width:220px; - /*background-color:rgba(245,245,245,1);*/ - background:url(<%= asset_path '75.png' %>) repeat left top; - -moz-box-shadow: 3px 0px 4px #472a12; /* Firefox */ - -webkit-box-shadow: 3px 0px 4px #472a12;/* Safari 和 Chrome */ - box-shadow: 3px 0px 4px #472a12; /* Opera 10.5 + */ -} -#search { - background:url(<%= asset_path 'search_block_bg.jpg' %>) repeat-x left top; - margin-top:43px; - padding:15px 12px; - height:20px; -} -#search input { - background:url(<%= asset_path 'search_bg.png' %>) no-repeat left top; - border:none; - width:154px; - height:20px; - padding: 0 20px; - font-family:Helvetica; -} -h1 { - background:url(<%= asset_path 'h1_bg.png' %>) repeat-x left top; - margin:0; - line-height:21px; - height:21px; - font-size:12px; - padding-left:10px; - font-weight:normal; - text-shadow:0px -1px 0px #000; - color:#FFF; - border-top:1px solid #424344; - border-bottom:1px solid #1b1b1b; -} -#user_list .member_setup ul li.set_1 { - background-position:left bottom; - border-top:1px solid #406cc3; - border-bottom:1px solid #242628; -} -#roles_list .member_setup ul li.set_2 { - background-position:left bottom; - border-top:1px solid #406cc3; - border-bottom:1px solid #242628; -} -#infos_list .member_setup ul li.set_3 { - background-position:left bottom; - border-top:1px solid #406cc3; - border-bottom:1px solid #242628; -} -#user_list .member_setup ul li.set_1 a span { - background-position:left bottom; - color:#eeeeee; -} -#roles_list .member_setup ul li.set_2 a span { - background-position:left bottom; - color:#eeeeee; -} -.member_setup ul { - color:#fff; - font-size:12px; - background:url(<%= asset_path 'line.png' %>) repeat-x left bottom; -} -.member_setup ul li { - background:url(<%= asset_path 'sidebar_li.jpg' %>) repeat-x left top; -/* line-height:31px;*/ - border-top:1px solid #424344; - border-bottom:1px solid #000000; -} -.member_setup ul li:hover { - background-position:left bottom; - border-top:1px solid #406cc3; - border-bottom:1px solid #242628; -} -.member_setup ul li a { - display: block; - padding: 7px 0 6px 12px; - color:#c4c4c4; -} -.member_setup ul li a span { - background:url(<%= asset_path 'add_mamber.png' %>) left top no-repeat; - text-shadow: 0px 1px 0px #000; - line-height: 18px; - padding: 2px 0 1px 35px; -} -.member_setup ul li a:hover span { - background-position:left bottom; - color:#eeeeee; -} -#main{ - position: relative; - margin-left: 260px; - padding-right: 40px; - height:100%; -} -.main_list { - padding-top:70px; -} -.main_list ul { - clear:both; -} -.main_list li { - background:url(<%= asset_path '75.png' %>) repeat left top; - margin-bottom:20px; -} -.main_list li span { - display:inline-block; - float:left; - padding-left:20px; - color:#fff; - font-size:14px; - line-height:40px; - width:18%; -} -.main_list li.list_head { - background:none; - margin-bottom:10px; -} -.main_list li.list_head span { - font-size:16px; - line-height:inherit; - text-shadow: 0px 1px 1px #3e2914; -} -.main_list li.list_item { - position:relative; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - -moz-box-shadow: 0px 0px 6px #291508; /* Firefox */ - -webkit-box-shadow: 0px 0px 6px #291508;/* Safari 和 Chrome */ - box-shadow: 0px 0px 6px #291508; /* Opera 10.5 + */ -} -.main_list li.list_item:hover { - border:1px solid #3699dd; -} -.main_list li.disable { - opacity:0.6; -} -.main_list li.list_item:hover span { - line-height:38px; -} -.main_list li .roles { -} -.main_list li .name { -} -.main_list li .email { -} -.main_list li .admin{ -} -.main_list li .action{ - float: right; - width:10%; -} -#main .action a{ - background-image:url(<%= asset_path 'icon.png' %>); - text-indent:-9999px; - display:inline-block; - width:19px; - height:19px; - margin-top:8px; - margin-right:10px; -} -#main .action a.show{ - background-position:left top; -} -#main .action a.edit{ - background-position:-19px top; -} -#main .action a.delete{ - background-position:-38px top; -} -#main a.switch{ - background:url(<%= asset_path 'switch.png' %>) no-repeat left 3px; - width:40px; -} -#main .disable a.switch{ - background:url(<%= asset_path 'switch.png' %>) no-repeat left bottom; -} -#main .action a.show:hover{ - background-position:left -19px; -} -#main .action a.edit:hover{ - background-position:-19px -19px; -} -#main .action a.delete:hover{ - background-position:-38px -19px; -} -#main .list_item .roles { - background-image:url(<%= asset_path 'roles_type.jpg' %>); - background-repeat:repeat-x; - border-radius: 5px 0 0 5px; - -moz-border-radius: 5px 0 0 5px; - -webkit-border-radius: 5px 0 0 5px; -} -#roles_list .roles_block .action a{ - margin-top:0; - margin-right:0; -} -.student { - background-position:0 -5px; -} -.teacher { - background-position:0 -54px; -} -#add_new a { - background-position:-54px -17px; -} -#add_new a:hover { - background-position: -54px 3px; -} -.buttom { - float:right; -} -#confirm a{ - background-position:4px -70px; -} -#confirm a:hover{ - background-position: 4px -51px; -} -#create a{ - background-image: none; - padding: 0 10px; -} -#update a{ - background-position:4px -112px; -} -#update a:hover{ - background-position:4px -89px; -} -#back a{ - background-position:4px -156px; -} -#back a:hover{ - background-position:4px -133px; -} -.buttom a { - margin:0 0 20px 10px; - background-image:url(<%= asset_path 'icon.png' %>); - background-repeat:no-repeat; - font-size:12px; - color:#FFF; - display:inline-block; - padding:0 10px 0 25px; - background-color: rgba(0, 0, 0, 0.75); - line-height:24px; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - -moz-box-shadow: 3px 0px 4px #180902; /* Firefox */ - -webkit-box-shadow: 3px 0px 4px #180902;/* Safari 和 Chrome */ - box-shadow: 3px 0px 4px #180902; /* Opera 10.5 + */ -} -.buttom a:hover { - color:#000; - font-weight:bold; - background-color: rgba(255, 255, 255, 1); -} -#porfile{ - padding-top:100px; -} -#porfile h2 { - color: #FFFFFF; - font-weight: normal; - margin: 0; - padding: 0; - text-shadow: 0 3px 2px #000000; - position:absolute; - top:-30px; -} -#porfile .user_mail { - text-align: center; - background:url(<%= asset_path 'upload_but.png' %>) repeat-x left top; - border:none; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - padding:3px 10px 1px; - margin-top:10px; - width:110px; - height: 21px; - font-size: 12px; - color:#666666; - text-shadow: 0 1px 0 #FFFFFF; -} -#porfile label { - display:block; - text-shadow: 0 1px 0 #FFFFFF; - background:url(<%= asset_path 'upload_but.png' %>) repeat-x left top; - height: 25px; - width:110px; - padding: 0 0 0 18px; - border:1px solid #d8d8d8; - margin-top:10px; - color:#666666; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; -} -#porfile label:hover{ - background-position:left bottom; - color:#000; - border:1px solid #a6a6a6; -} -#porfile label input { - border:none; - margin: 6px 15px 0 0; - float:left; -} -#porfile label span { - display:block; - float:left; - line-height:27px; - font-size:12px; -} -.roles_block { - min-width:710px; - margin-bottom:50px; - position:relative; - padding-bottom: 20px; - background:url(<%= asset_path '75.png' %>) repeat left top; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - -moz-box-shadow: 0px 0px 4px #180902; /* Firefox */ - -webkit-box-shadow: 0px 0px 4px #180902;/* Safari 和 Chrome */ - box-shadow: 0px 0px 4px #180902; /* Opera 10.5 + */ -} -#user_list .roles_block { - margin-left:180px; -} -#person { - text-align:center; - left: 265px; - position: fixed; - top: 75px; -} -#person img { - background-color:#FFF; - padding:5px; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - -moz-box-shadow: 0px 0px 4px #180902; /* Firefox */ - -webkit-box-shadow: 0px 0px 4px #180902;/* Safari 和 Chrome */ - box-shadow: 0px 0px 4px #180902; /* Opera 10.5 + */ -} -#person .mail { - color: #FFFFFF; - font-size: 12px; - text-shadow:0px 1px 0px #333; - font-weight:bold; - background:url(<%= asset_path 'line.png' %>) repeat-x left top; - padding-top:10px; -} -#upload, #edit{ - margin: 0 auto; - display:block; - text-shadow: 0 1px 0 #FFFFFF; - background:url(<%= asset_path 'upload_but.png' %>) repeat-x left top; - height: 25px; - line-height:27px; - color:#666666; - width:128px; - text-align:center; - font-size:12px; - border:1px solid #d8d8d8; - margin-top:10px; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; -} -#upload:hover{ - background-position:left bottom; - color:#000; - border:1px solid #a6a6a6; -} -#main hr{ - height:8px; - border:none; - margin:0; - border-radius: 5px 5px 0px 0px; - -moz-border-radius: 5px 5px 0px 0px; - -webkit-border-radius: 5px 5px 0px 0px; - border-bottom:1px solid #000; -} -#basic_block hr{ - background-color:#666666; -} -#teacher_block hr{ - background-color:#0071a9; -} -#student_block hr{ - background-color:#af0045; -} -.info_input { - padding:10px 20px; -} -.info_input table { - color:#fff; - width:100%; - font-size:14px; -} -.info_input table td { - padding:5px 10px 5px 0; - width: 10%; -} -.info_input .list_head { - background:url(<%= asset_path 'line.png' %>) left bottom repeat-x; -} -.info_input .list_head td { -} -.info_input .list_item { - color:#AEAEAE; -} -.info_input .add { - display:block; - padding-left:22px; - font-size:12px; - line-height:21px; - height:19px; - background:url(<%= asset_path 'icon.png' %>) no-repeat -59px 0; - margin-top: 10px; - color: #DDDDDD; -} -.info_input .add:hover { - color:#FFF; - background-position:-59px -19px; -} -.info_input li { - height:30px; - margin-bottom: 5px; -} -.info_input li span { - display:inline-block; - float:left; - color:#fff; - font-size:14px; - line-height:30px; - margin-right:10px; -} -#user_list .info_input li span { - width: 25%; -} -#roles_list .info_input li span { - width:15%; -} -.info_input li span:last-child { -} -#person select { - background:url(<%= asset_path 'upload_but.png' %>) repeat-x left top; - border:1px solid #d8d8d8; - margin-top: 10px; - width: 130px; - padding:3px 6px 3px 14px; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border:none; -} \ No newline at end of file diff --git a/app/assets/stylesheets/message.css b/app/assets/stylesheets/message.css new file mode 100644 index 00000000..ad67f31a --- /dev/null +++ b/app/assets/stylesheets/message.css @@ -0,0 +1,11 @@ +.error{ + color:red; + } + +.notice, .message{ + color:green; + } + +.warning{ + color:orange; + } diff --git a/app/assets/stylesheets/messy.css.erb b/app/assets/stylesheets/messy.css.erb deleted file mode 100644 index 3cc491d8..00000000 --- a/app/assets/stylesheets/messy.css.erb +++ /dev/null @@ -1,305 +0,0 @@ -body{ - background:url(<%= asset_path 'wood_floor.jpg' %>) fixed center 0; - /*background:url(images/jobs.jpg) fixed center bottom;*/ - -moz-background-size:cover; - background-size:cover; - color: #000000; - margin: 0; - padding: 0; -} -#hmenu{ - background:url(<%= asset_path 'orbitbar1.png' %>) repeat-x 0 0; - height: 50px; - position:fixed; - top:0; - left:0; - width:100%; - z-index: 5; -} -#orbit_icon { - margin-left: 10px; -} -#orbit_icon a { - background:url(<%= asset_path 'bar_orbit.png' %>) no-repeat scroll left top transparent; - height: 43px; - width: 41px; - display:block; - text-indent:-9999px; -} -#orbit_icon a:hover { - background:url(<%= asset_path 'bar_orbit.png' %>) no-repeat scroll left 50% transparent; -} -#hmenu #left{ - left: 51px; - position: absolute; - top: 1px; -} -#hmenu #left a{ - border-left: 1px solid #000000; - border-right: 1px solid #7F8488; - color: #FFFFFF; - display: block; - font-size: 17px; - height: 40px; - line-height: 40px; - padding: 0 10px; - text-align: center; - text-decoration: none; -} -#hmenu #left a:hover{ - background:#000; - color: #FFFFFF; -} -#hmenu #right{ - position: absolute; - right: 10px; - top: 1px; - width: 393px; -} -#hmenu #right a{ - border-left: 1px solid #7F8488; - border-right: 1px solid #7F8488; - color: #FFFFFF; - display: block; - font-size: 17px; - height: 40px; - line-height: 40px; - padding: 0 10px; - text-align: center; - text-decoration: none; - width: 65px; -} -#hmenu #right a:hover{ - background:#000; - color: #FFFFFF; -} -#hmenu form{ - left: 27px; - position: absolute; - top: 8px; -} -#login_id{ - background:url(<%= asset_path 'bar_id.png' %>) no-repeat scroll 0 0 transparent; - border: medium none; - color: #818181; - font-family: arial,sans-serif; - height: 26px; - left: 70px; - position: absolute; - top: 0; - width: 119px; -} -#login_id input { - background: none repeat scroll 0 0 transparent; - border: medium none; - font-family: arial,sans-serif; - height: 15px; - left: 21px; - position: absolute; - top: 4px; - width: 92px; -} - -#login_pw { - background:url(<%= asset_path 'bar_pw.png' %>) no-repeat scroll 0 0 transparent; - border: medium none; - color: #818181; - font-family: arial,sans-serif; - height: 26px; - left: 193px; - position: absolute; - top: 0; - width: 119px; -} - -#login_pw input { - background: none repeat scroll 0 0 transparent; - border: medium none; - font-family: arial,sans-serif; - height: 15px; - left: 21px; - position: absolute; - top: 4px; - width: 92px; -} -#login_btn input { - background:url(<%= asset_path 'bar_btn.png' %>) no-repeat scroll 0 0 transparent; - border: medium none; - color: #FFFFFF; - cursor: pointer; - font-family: arial,sans-serif; - height: 26px; - left: 316px; - margin: 0; - padding: 0 0 2px; - position: absolute; - top: 0; - width: 50px; -} - -#log_out a{ - background:url(<%= asset_path 'service_btn.png' %>) no-repeat scroll right 0 transparent; - border: medium none !important; - display: block !important; - height: 40px !important; - line-height: normal !important; - padding: 0 !important; - position: absolute; -/* right: -9px;*/ - text-indent: -10000px; - top: 0px; - width: 43px !important; -} -#log_out a:hover{ - background:url(<%= asset_path 'service_btn.png' %>) no-repeat scroll right bottom transparent !important; -} - -#hmenu #right select{ - font-family: helvetica,arial,sans-serif; - left: 97px; - position: absolute; - top: 10px; - width: 120px; -} -.content{ - padding: 10px; -} - -#user_info{ - background: none repeat scroll 0 0 #FEFEFE; - border: 1px solid #818181; - border-radius: 5px 5px 5px 5px; - margin: 0 0 20px; - padding: 10px; - width: 250px; -} - -#user_info table{ - border-collapse: collapse; - width: 100%; -} -#user_info table td{ - padding: 3px; -} - -#sites_info{ - background: -webkit-gradient(linear, left top, left bottom, from(white), to(#F8F8F8)); - border: 1px solid #818181; - border-radius: 5px 5px 5px 5px; - float: left; - margin: 0 20px 20px 0; - width: 30%; - min-width: 320px; -} -#sites_info h3{ - background: none repeat scroll 0 0 #EEEEEE; - border: 1px solid #DDDDDD; - border-radius: 5px 5px 5px 5px; - font: 24px/100% helvetica,arial,sans-serif; - margin: 2% 2% 0; - padding: 1%; -} -#sites_info table{ - background: none repeat scroll 0 0 #fff; - border: 1px solid #DDDDDD; - border-radius: 5px 5px 5px 5px; - margin: 2%; - width: 96%; -} -#sites_info table td{ - padding: 10px 5px; -} -#sites_info table th{ - border-right: 1px solid #DDDDDD; - color: #808080; - font-size: 18px; - font-weight: normal; - padding: 10px 5px; - text-align: right; - width: 20%; -} - - -#purchases{ - background: -webkit-gradient(linear, left top, left bottom, from(white), to(#F8F8F8)); - border: 1px solid #818181; - border-radius: 5px 5px 5px 5px; - float: left; - width: 30%; - min-width: 320px; -} -#purchases h3{ - background: none repeat scroll 0 0 #EEEEEE; - border: 1px solid #DDDDDD; - border-radius: 5px 5px 5px 5px; - font: 24px/100% helvetica,arial,sans-serif; - margin: 2% 2% 0; - padding: 1%; -} -#purchases table{ - background: none repeat scroll 0 0 #fff; - border: 1px solid #DDDDDD; - border-radius: 5px 5px 5px 5px; - margin: 2%; - width: 96%; -} -#purchases table th{ - border-right: 1px solid #DDDDDD; - color: #808080; - font-size: 18px; - font-weight: normal; - padding: 10px 5px; - text-align: right; - width: 20%; -} -#purchases table td{ - padding: 10px 5px; -} -.design_page{ -} -.style_list{ - background:url(<%= asset_path 'preview.png' %>) no-repeat 0 0; - height:246px; - margin: 20px 0; - padding: 0 0 0 236px; -} -.style_list ul{ - margin:0; - padding:0; -} -.style_list li{ - color: #EDA330; - font-size: 20px; - list-style: none outside none; - margin: 0 0 20px; -} -.list_title{ - color: #818181; - display: block; - font: 24px/100% ·L³n¥¿¶ÂÅé,sans-serif; -} -.buy_btn a{ - background:url(<%= asset_path "buy_btn.png" %>) no-repeat scroll 0 0 transparent; - color: #000000; - display: block; - font-size: 22px; - height: 37px; - line-height: 37px; - text-align: center; - text-decoration: none; - text-shadow: 0 1px 0 #FFFFFF; - width: 170px; -} -.buy_btn a:hover{ - background-position:0 bottom; -} -.bought_btn{ - background:url(<%= asset_path "bought_btn.png" %>) no-repeat scroll 0 0 transparent; - color: #FFFFFF; - font-size: 22px; - height: 37px; - line-height: 37px; - text-align: center; - text-shadow: 0 1px 0 #C06408; - width: 170px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/content.css.erb b/app/assets/stylesheets/site_edition.css.erb similarity index 99% rename from app/assets/stylesheets/content.css.erb rename to app/assets/stylesheets/site_edition.css.erb index 2d3cd2d0..fb469a0e 100644 --- a/app/assets/stylesheets/content.css.erb +++ b/app/assets/stylesheets/site_edition.css.erb @@ -1,4 +1,3 @@ - html, body{ height: 100%; margin: 0; diff --git a/app/assets/stylesheets/site_editor.css.erb b/app/assets/stylesheets/site_editor.css.erb new file mode 100644 index 00000000..859c1e79 --- /dev/null +++ b/app/assets/stylesheets/site_editor.css.erb @@ -0,0 +1,8 @@ +/* + *This is a manifest file that'll automatically include all the stylesheets available in this directory + *and any sub-directories. You're free to add application-wide styles to this file and they'll appear at + *the top of the compiled file, but it's generally better to create a new file per style scope. + *= require_self + *= require message + *= require site_edition +*/ \ No newline at end of file diff --git a/app/controllers/admin/items_controller.rb b/app/controllers/admin/items_controller.rb index 9c9f81e5..64364691 100644 --- a/app/controllers/admin/items_controller.rb +++ b/app/controllers/admin/items_controller.rb @@ -1,6 +1,6 @@ class Admin::ItemsController < ApplicationController - layout "content" + layout "site_editor" before_filter :authenticate_user! before_filter :find_parent_item diff --git a/app/controllers/admin/links_controller.rb b/app/controllers/admin/links_controller.rb index d733337c..1f5a1430 100644 --- a/app/controllers/admin/links_controller.rb +++ b/app/controllers/admin/links_controller.rb @@ -1,6 +1,6 @@ class Admin::LinksController < ApplicationController - layout "content" + layout "site_editor" before_filter :authenticate_user! before_filter :find_parent_item diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index ffa1e687..f77a7782 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -1,6 +1,6 @@ class Admin::PagePartsController < ApplicationController - layout "content" + layout "site_editor" before_filter :authenticate_user! before_filter :is_admin? diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index 4ea26f12..224113c3 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -1,6 +1,6 @@ class Admin::PagesController < ApplicationController - layout "content" + layout "site_editor" before_filter :authenticate_user! before_filter :find_parent_item diff --git a/app/controllers/admin/user_attributes_controller.rb b/app/controllers/admin/user_attributes_controller.rb index 127f4c7f..c7021c74 100644 --- a/app/controllers/admin/user_attributes_controller.rb +++ b/app/controllers/admin/user_attributes_controller.rb @@ -1,6 +1,6 @@ class Admin::UserAttributesController < ApplicationController - layout "member" + layout "admin" before_filter :authenticate_user! def index diff --git a/app/controllers/admin/user_info_models_controller.rb b/app/controllers/admin/user_info_models_controller.rb index 29a26dba..7660d699 100644 --- a/app/controllers/admin/user_info_models_controller.rb +++ b/app/controllers/admin/user_info_models_controller.rb @@ -1,6 +1,6 @@ class Admin::UserInfoModelsController < ApplicationController - layout "member" + layout "admin" before_filter :authenticate_user! before_filter :is_admin? before_filter :set_attribute, :only => [:index, :show, :new, :edit] diff --git a/app/controllers/admin/user_role_models_controller.rb b/app/controllers/admin/user_role_models_controller.rb index ecb8b5a2..b4145a8f 100644 --- a/app/controllers/admin/user_role_models_controller.rb +++ b/app/controllers/admin/user_role_models_controller.rb @@ -1,6 +1,6 @@ class Admin::UserRoleModelsController < ApplicationController - layout "member" + layout "admin" before_filter :authenticate_user! before_filter :is_admin? before_filter :set_attribute, :only => [:index, :show, :new, :edit] diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 46d7ed96..79df2f2a 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -1,6 +1,6 @@ class Admin::UsersController < ApplicationController - layout "member" + layout "admin" before_filter :authenticate_user! def index diff --git a/app/views/admin/designs/_form.html.erb b/app/views/admin/designs/_form.html.erb index 2711faa0..b6ba7cb2 100644 --- a/app/views/admin/designs/_form.html.erb +++ b/app/views/admin/designs/_form.html.erb @@ -1,5 +1,8 @@ <% content_for :page_specific_css do %> - <%= stylesheet_link_tag "design_temp" %> + <%= stylesheet_link_tag "design" %> +<% end %> +<% content_for :page_specific_javascript do %> + <%= javascript_include_tag "design" %> <% end %>

    diff --git a/app/views/admin/designs/_stylesheet_field.html.erb b/app/views/admin/designs/_stylesheet_field.html.erb deleted file mode 100644 index e69de29b..00000000 diff --git a/app/views/admin/user_attribute_models/edit.html.erb b/app/views/admin/user_attribute_models/edit.html.erb index 810da772..b70e5275 100644 --- a/app/views/admin/user_attribute_models/edit.html.erb +++ b/app/views/admin/user_attribute_models/edit.html.erb @@ -1,5 +1,3 @@ -<% content_for :body_id do %><%= "#{@attribute}s_list" %><% end -%> -

    <%= form_for @user_attribute_model, :url => eval("admin_user_#{@attribute}_model_path(@user_role_model)") do |f| %> <%= f.error_messages %> diff --git a/app/views/admin/user_attribute_models/index.html.erb b/app/views/admin/user_attribute_models/index.html.erb index c8371261..c7a65d65 100644 --- a/app/views/admin/user_attribute_models/index.html.erb +++ b/app/views/admin/user_attribute_models/index.html.erb @@ -1,5 +1,3 @@ -<% content_for :body_id do %><%= "#{@attribute}s_list" %><% end -%> -
    <%= link_to t("admin.new_user_#{@attribute}"), eval("new_admin_user_#{@attribute}_model_path") %> diff --git a/app/views/admin/user_attribute_models/new.html.erb b/app/views/admin/user_attribute_models/new.html.erb index aaa6a032..4dd1baa6 100644 --- a/app/views/admin/user_attribute_models/new.html.erb +++ b/app/views/admin/user_attribute_models/new.html.erb @@ -1,5 +1,3 @@ -<% content_for :body_id do %><%= "#{@attribute}s_list" %><% end -%> -
    <%= form_for @user_attribute_model, :url => eval("admin_user_#{@attribute}_models_path") do |f| %> <%= f.error_messages %> diff --git a/app/views/admin/users/_form.html.erb b/app/views/admin/users/_form.html.erb index ada41c1f..f40048cf 100644 --- a/app/views/admin/users/_form.html.erb +++ b/app/views/admin/users/_form.html.erb @@ -4,9 +4,8 @@ <% else %> <%= image_tag "person.png" %> <% end %> - <%#= file_field_tag 'file' %> - <%#= hidden_field_tag :avatar_cache %> - <%= t('admin.choose_file') %> + <%= file_field_tag 'file' %> + <%= hidden_field_tag :avatar_cache %> <%= f.text_field :email, :onfocus => "this.value='';", :onblur => "if(this.value==''){this.value=#{t('admin.email')};}", :value => (@user.email.blank? ? t('admin.email') : @user.email), :class => 'user_mail' %>