refinerycms-core 2.0.10 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/refinery/admin.js.erb +126 -234
- data/app/assets/javascripts/refinery/ajaxy_pagination.js.coffee +1 -1
- data/app/assets/javascripts/refinery/boot_wym.js.erb +4 -8
- data/app/assets/javascripts/refinery/core.js +1 -1
- data/app/assets/javascripts/refinery/interface.js.coffee.erb +3 -16
- data/app/assets/javascripts/refinery/modal_dialogs.js.erb +0 -3
- data/app/assets/javascripts/refinery/nestedsortables.js +312 -312
- data/app/assets/javascripts/refinery/refinery.js.erb +14 -15
- data/app/assets/javascripts/refinery/site_bar.js +3 -9
- data/app/assets/javascripts/refinery/sortable_list.js +145 -0
- data/app/assets/javascripts/refinery/sortable_menu.js.coffee +3 -4
- data/app/assets/javascripts/refinery/submit_continue.js.coffee.erb +1 -2
- data/app/assets/javascripts/refinery/tree.js +3 -3
- data/app/assets/javascripts/refinery/wymeditor.js +6 -6
- data/{public → app/assets/javascripts}/wymeditor/GPL-license.txt +0 -0
- data/{public → app/assets/javascripts}/wymeditor/MIT-license.txt +0 -0
- data/{public → app/assets/javascripts}/wymeditor/README +0 -0
- data/app/assets/javascripts/wymeditor/browsers/mozilla.js.erb +10 -11
- data/app/assets/javascripts/wymeditor/browsers/webkit.js.erb +17 -18
- data/app/assets/javascripts/wymeditor/classes.js.erb +3 -5
- data/app/assets/javascripts/wymeditor/functions.js.erb +5 -1
- data/app/assets/javascripts/wymeditor/prototypes.js.erb +0 -3
- data/app/assets/javascripts/wymeditor/setup.js.erb +5 -5
- data/app/assets/javascripts/wymeditor/skins/refinery/skin.js +1 -4
- data/app/assets/javascripts/wymeditor/validators.js.erb +3 -2
- data/app/assets/stylesheets/{formatting.css.scss → refinery/formatting.css.scss} +0 -0
- data/app/assets/stylesheets/refinery/layout.css.scss +41 -11
- data/app/assets/stylesheets/{theme.css.scss → refinery/theme.css.scss} +0 -0
- data/app/controllers/refinery/sitemap_controller.rb +1 -5
- data/app/helpers/refinery/admin_helper.rb +6 -0
- data/app/helpers/refinery/image_helper.rb +2 -1
- data/app/helpers/refinery/menu_helper.rb +0 -49
- data/app/helpers/refinery/meta_helper.rb +7 -3
- data/app/helpers/refinery/site_bar_helper.rb +3 -15
- data/app/models/refinery/core/base_model.rb +2 -0
- data/{lib → app/presenters}/refinery/base_presenter.rb +1 -2
- data/app/views/layouts/application.html.erb +8 -7
- data/app/views/refinery/_content_page.html.erb +1 -1
- data/app/views/refinery/_google_analytics.html.erb +12 -5
- data/app/views/refinery/_head.html.erb +11 -15
- data/app/views/refinery/_header.html.erb +1 -4
- data/app/views/refinery/_javascripts.html.erb +14 -8
- data/app/views/refinery/_site_bar.html.erb +4 -4
- data/app/views/refinery/admin/_form_advanced_options_menu.html.erb +12 -0
- data/app/views/refinery/admin/_javascripts.html.erb +13 -1
- data/app/views/refinery/admin/_locale_picker.html.erb +11 -0
- data/app/views/refinery/admin/_make_sortable.html.erb +8 -5
- data/app/views/refinery/admin/_search.html.erb +1 -7
- data/app/views/refinery/admin/_search_header.html.erb +1 -0
- data/app/views/refinery/admin/_wysiwyg.html.erb +16 -0
- data/config/initializers/will_paginate_monkeypatch.rb +1 -1
- data/config/locales/bg.yml +5 -1
- data/config/locales/cs.yml +5 -1
- data/config/locales/da.yml +5 -1
- data/config/locales/de.yml +7 -3
- data/config/locales/el.yml +5 -1
- data/config/locales/en.yml +7 -1
- data/config/locales/es.yml +5 -1
- data/config/locales/fi.yml +5 -1
- data/config/locales/fr.yml +5 -1
- data/config/locales/hu.yml +82 -0
- data/config/locales/it.yml +38 -34
- data/config/locales/ja.yml +5 -1
- data/config/locales/ko.yml +5 -1
- data/config/locales/lt.yml +5 -1
- data/config/locales/lv.yml +5 -1
- data/config/locales/nb.yml +5 -1
- data/config/locales/nl.yml +36 -29
- data/config/locales/pl.yml +8 -1
- data/config/locales/pt-BR.yml +7 -3
- data/config/locales/pt.yml +82 -0
- data/config/locales/rs.yml +5 -1
- data/config/locales/ru.yml +5 -1
- data/config/locales/sk.yml +10 -3
- data/config/locales/sl.yml +5 -1
- data/config/locales/sv.yml +5 -1
- data/config/locales/tr.yml +82 -0
- data/config/locales/uk.yml +77 -0
- data/config/locales/vi.yml +5 -1
- data/config/locales/zh-CN.yml +5 -1
- data/config/locales/zh-TW.yml +5 -1
- data/config/routes.rb +3 -3
- data/lib/generators/refinery/cms/cms_generator.rb +29 -0
- data/lib/generators/refinery/cms/templates/.gitignore +1 -0
- data/lib/generators/refinery/cms/templates/app/views/sitemap/index.xml.builder +13 -13
- data/lib/generators/refinery/core/templates/config/initializers/refinery/core.rb.erb +8 -12
- data/lib/generators/refinery/dummy/templates/rails/database.yml +3 -3
- data/lib/generators/refinery/engine/engine_generator.rb +8 -12
- data/lib/generators/refinery/engine/templates/Gemfile +5 -39
- data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb.erb +4 -4
- data/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb.erb +2 -3
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_actions.html.erb +1 -1
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb +31 -33
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +1 -3
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_singular_name.html.erb +2 -2
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/index.html.erb +1 -1
- data/lib/generators/refinery/engine/templates/config/locales/cs.yml +28 -0
- data/lib/generators/refinery/engine/templates/config/locales/it.yml +28 -0
- data/lib/generators/refinery/engine/templates/config/locales/nl.yml +6 -6
- data/lib/generators/refinery/engine/templates/config/locales/tr.yml +28 -0
- data/lib/generators/refinery/engine/templates/config/routes.rb.erb +2 -2
- data/lib/generators/refinery/engine/templates/db/seeds.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/lib/refinery/plural_name/engine.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/spec/{requests → features}/refinery/namespace/admin/plural_name_spec.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/spec/spec_helper.rb +25 -49
- data/lib/generators/refinery/form/form_generator.rb +1 -13
- data/lib/generators/refinery/form/templates/app/models/refinery/namespace/singular_name.rb.erb +0 -4
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +2 -2
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/spam.html.erb +7 -6
- data/lib/generators/refinery/form/templates/config/locales/nl.yml +29 -29
- data/lib/generators/refinery/form/templates/config/locales/tr.yml +78 -0
- data/lib/generators/refinery/form/templates/config/routes.rb.erb +1 -1
- data/lib/generators/refinery/form/templates/db/migrate/1_create_plural_name.rb.erb +2 -6
- data/lib/generators/refinery/form/templates/db/seeds.rb.erb +1 -1
- data/lib/generators/refinery/form/templates/lib/refinery/plural_name/engine.rb.erb +1 -1
- data/lib/generators/refinery/form/templates/refinerycms-plural_name.gemspec +2 -5
- data/lib/refinery.rb +191 -0
- data/lib/refinery/admin/base_controller.rb +27 -16
- data/lib/refinery/application_controller.rb +15 -47
- data/lib/refinery/cli.rb +48 -27
- data/lib/refinery/core.rb +7 -183
- data/lib/refinery/core/configuration.rb +17 -9
- data/lib/refinery/core/engine.rb +11 -47
- data/lib/refinery/crud.rb +81 -66
- data/lib/refinery/engine.rb +52 -55
- data/lib/refinery/ext/action_view/helpers/form_builder.rb +2 -0
- data/lib/refinery/extension_generation.rb +208 -110
- data/lib/refinery/menu.rb +16 -7
- data/lib/refinery/menu_item.rb +56 -54
- data/lib/refinery/plugin.rb +11 -3
- data/lib/refinery/plugins.rb +14 -1
- data/lib/refinery/version.rb +3 -3
- data/refinerycms-core.gemspec +11 -10
- data/spec/controllers/refinery/admin/dummy_controller_spec.rb +57 -0
- data/spec/controllers/refinery/admin/refinery_core_controller_spec.rb +3 -4
- data/spec/controllers/refinery/sitemap_controller_spec.rb +1 -14
- data/spec/{requests → features}/refinery/admin/custom_assets_spec.rb +1 -1
- data/spec/{requests → features}/refinery/admin/dialogs_spec.rb +1 -1
- data/spec/features/refinery/admin/xhr_paging_spec.rb +55 -0
- data/spec/features/refinery/application_layout_spec.rb +19 -0
- data/spec/features/refinery/core_spec.rb +14 -0
- data/spec/{requests → features}/refinery/site_bar_spec.rb +1 -1
- data/spec/helpers/refinery/meta_helper_spec.rb +25 -0
- data/spec/lib/generators/refinery/cms/cms_generator_spec.rb +61 -0
- data/spec/lib/generators/refinery/engine/engine_generator_multiple_resources_spec.rb +28 -1
- data/spec/lib/generators/refinery/engine/engine_generator_sanity_check_spec.rb +7 -7
- data/spec/lib/generators/refinery/engine/engine_generator_spec.rb +69 -8
- data/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb +0 -2
- data/spec/lib/generators/refinery/form/form_generator_spec.rb +9 -1
- data/spec/lib/refinery/application_controller_spec.rb +48 -63
- data/spec/lib/refinery/cli_spec.rb +136 -0
- data/spec/lib/refinery/core/configuration_spec.rb +17 -0
- data/spec/lib/refinery/core_spec.rb +19 -13
- data/spec/lib/refinery/crud_spec.rb +0 -4
- data/spec/lib/refinery/menu_spec.rb +16 -26
- data/spec/support/refinery.rb +6 -1
- data/{app → vendor}/assets/javascripts/jquery/GPL-LICENSE.txt +0 -0
- data/{app → vendor}/assets/javascripts/jquery/MIT-LICENSE.txt +0 -0
- data/vendor/assets/javascripts/jquery/jquery.browser.js +49 -0
- data/{app → vendor}/assets/javascripts/jquery/jquery.html5-placeholder-shim.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery/jquery.jcarousel.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery/jquery.textTruncate.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery/jquery.timers.js +0 -0
- data/{app → vendor}/assets/javascripts/modernizr-min.js +0 -0
- metadata +231 -78
- data/app/assets/images/refinery/resolve_digital_footer_logo.png +0 -0
- data/app/assets/javascripts/dd_belatedpng.js +0 -13
- data/app/assets/javascripts/jquery/jquery.corner.js +0 -345
- data/app/assets/stylesheets/application.css.scss +0 -55
- data/app/assets/stylesheets/home.css.scss +0 -3
- data/app/views/refinery/_ie6check.html.erb +0 -63
- data/app/views/refinery/_menu.html.erb +0 -20
- data/app/views/refinery/_menu_branch.html.erb +0 -19
- data/lib/generators/refinery/engine/templates/Guardfile +0 -27
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_locale_picker.html.erb +0 -11
- data/lib/refinery/catch_all_routes.rb +0 -3
- data/lib/tasks/yard.rake +0 -30
- data/spec/requests/refinery/admin/controller_restriction_spec.rb +0 -27
- data/spec/requests/refinery/search_spec.rb +0 -71
Binary file
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
|
3
|
-
* Author: Drew Diller
|
4
|
-
* Email: drew.diller@gmail.com
|
5
|
-
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
|
6
|
-
* Version: 0.0.8a
|
7
|
-
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
|
8
|
-
*
|
9
|
-
* Example usage:
|
10
|
-
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
|
11
|
-
* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
|
12
|
-
**/
|
13
|
-
var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();
|
@@ -1,345 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* jQuery corner plugin: simple corner rounding
|
3
|
-
* Examples and documentation at: http://jquery.malsup.com/corner/
|
4
|
-
* version 2.11 (15-JUN-2010)
|
5
|
-
* Requires jQuery v1.3.2 or later
|
6
|
-
* Dual licensed under the MIT and GPL licenses:
|
7
|
-
* http://www.opensource.org/licenses/mit-license.php
|
8
|
-
* http://www.gnu.org/licenses/gpl.html
|
9
|
-
* Authors: Dave Methvin and Mike Alsup
|
10
|
-
*/
|
11
|
-
|
12
|
-
/**
|
13
|
-
* corner() takes a single string argument: $('#myDiv').corner("effect corners width")
|
14
|
-
*
|
15
|
-
* effect: name of the effect to apply, such as round, bevel, notch, bite, etc (default is round).
|
16
|
-
* corners: one or more of: top, bottom, tr, tl, br, or bl. (default is all corners)
|
17
|
-
* width: width of the effect; in the case of rounded corners this is the radius.
|
18
|
-
* specify this value using the px suffix such as 10px (yes, it must be pixels).
|
19
|
-
*/
|
20
|
-
; (function($) {
|
21
|
-
|
22
|
-
var style = document.createElement('div').style;
|
23
|
-
var moz = style['MozBorderRadius'] !== undefined;
|
24
|
-
var webkit = style['WebkitBorderRadius'] !== undefined;
|
25
|
-
var radius = style['borderRadius'] !== undefined || style['BorderRadius'] !== undefined;
|
26
|
-
var mode = document.documentMode || 0;
|
27
|
-
var noBottomFold = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
|
28
|
-
|
29
|
-
$.support = $.support || {};
|
30
|
-
$.support.borderRadius = moz || webkit || radius;
|
31
|
-
// so you can do: if (!$.support.borderRadius) $('#myDiv').corner();
|
32
|
-
var expr = $.browser.msie && (function() {
|
33
|
-
var div = document.createElement('div');
|
34
|
-
try {
|
35
|
-
div.style.setExpression('width', '0+0');
|
36
|
-
div.style.removeExpression('width');
|
37
|
-
}
|
38
|
-
catch(e) {
|
39
|
-
return false;
|
40
|
-
}
|
41
|
-
return true;
|
42
|
-
})();
|
43
|
-
|
44
|
-
function sz(el, p) {
|
45
|
-
return parseInt($.css(el, p)) || 0;
|
46
|
-
};
|
47
|
-
function hex2(s) {
|
48
|
-
var s = parseInt(s).toString(16);
|
49
|
-
return (s.length < 2) ? '0' + s: s;
|
50
|
-
};
|
51
|
-
function gpc(node) {
|
52
|
-
while (node) {
|
53
|
-
var v = $.css(node, 'backgroundColor');
|
54
|
-
if (v && v != 'transparent' && v != 'rgba(0, 0, 0, 0)') {
|
55
|
-
if (v.indexOf('rgb') >= 0) {
|
56
|
-
var rgb = v.match(/\d+/g);
|
57
|
-
return '#' + hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);
|
58
|
-
}
|
59
|
-
return v;
|
60
|
-
}
|
61
|
-
if (node.nodeName.toLowerCase() == 'html')
|
62
|
-
break;
|
63
|
-
node = node.parentNode;
|
64
|
-
// keep walking if transparent
|
65
|
-
}
|
66
|
-
return '#ffffff';
|
67
|
-
};
|
68
|
-
|
69
|
-
function getWidth(fx, i, width) {
|
70
|
-
switch (fx) {
|
71
|
-
case 'round':
|
72
|
-
return Math.round(width * (1 - Math.cos(Math.asin(i / width))));
|
73
|
-
case 'cool':
|
74
|
-
return Math.round(width * (1 + Math.cos(Math.asin(i / width))));
|
75
|
-
case 'sharp':
|
76
|
-
return Math.round(width * (1 - Math.cos(Math.acos(i / width))));
|
77
|
-
case 'bite':
|
78
|
-
return Math.round(width * (Math.cos(Math.asin((width - i - 1) / width))));
|
79
|
-
case 'slide':
|
80
|
-
return Math.round(width * (Math.atan2(i, width / i)));
|
81
|
-
case 'jut':
|
82
|
-
return Math.round(width * (Math.atan2(width, (width - i - 1))));
|
83
|
-
case 'curl':
|
84
|
-
return Math.round(width * (Math.atan(i)));
|
85
|
-
case 'tear':
|
86
|
-
return Math.round(width * (Math.cos(i)));
|
87
|
-
case 'wicked':
|
88
|
-
return Math.round(width * (Math.tan(i)));
|
89
|
-
case 'long':
|
90
|
-
return Math.round(width * (Math.sqrt(i)));
|
91
|
-
case 'sculpt':
|
92
|
-
return Math.round(width * (Math.log((width - i - 1), width)));
|
93
|
-
case 'dogfold':
|
94
|
-
case 'dog':
|
95
|
-
return (i & 1) ? (i + 1) : width;
|
96
|
-
case 'dog2':
|
97
|
-
return (i & 2) ? (i + 1) : width;
|
98
|
-
case 'dog3':
|
99
|
-
return (i & 3) ? (i + 1) : width;
|
100
|
-
case 'fray':
|
101
|
-
return (i % 2) * width;
|
102
|
-
case 'notch':
|
103
|
-
return width;
|
104
|
-
case 'bevelfold':
|
105
|
-
case 'bevel':
|
106
|
-
return i + 1;
|
107
|
-
}
|
108
|
-
};
|
109
|
-
|
110
|
-
$.fn.corner = function(options) {
|
111
|
-
// in 1.3+ we can fix mistakes with the ready state
|
112
|
-
var elements = this;
|
113
|
-
// help IE *yet again*.
|
114
|
-
if ($.browser.msie && $.browser.version < 9) {
|
115
|
-
elements = elements.not('input, .button');
|
116
|
-
/*
|
117
|
-
(inputs = elements.find('input.button')).removeClass('button');
|
118
|
-
elements = elements.not('input');
|
119
|
-
inputs.each(function() {
|
120
|
-
wrapper = $("<span></span>").addClass($(this).className).addClass('button-wrapper');
|
121
|
-
wrapper.insertBefore($(this));
|
122
|
-
wrapper.append($(this));
|
123
|
-
});
|
124
|
-
elements = elements.add($('span.button-wrapper'));
|
125
|
-
*/
|
126
|
-
}
|
127
|
-
|
128
|
-
if (elements.length == 0) {
|
129
|
-
if (!$.isReady && this.selector) {
|
130
|
-
var s = this.selector,
|
131
|
-
c = this.context;
|
132
|
-
$(function() {
|
133
|
-
$(s, c).corner(options);
|
134
|
-
});
|
135
|
-
}
|
136
|
-
return this;
|
137
|
-
}
|
138
|
-
|
139
|
-
return elements.each(function(index) {
|
140
|
-
var $this = $(this);
|
141
|
-
// meta values override options
|
142
|
-
var o = [$this.attr($.fn.corner.defaults.metaAttr) || '', options || ''].join(' ').toLowerCase();
|
143
|
-
var keep = /keep/.test(o);
|
144
|
-
// keep borders?
|
145
|
-
var cc = ((o.match(/cc:(#[0-9a-f]+)/) || [])[1]);
|
146
|
-
// corner color
|
147
|
-
var sc = ((o.match(/sc:(#[0-9a-f]+)/) || [])[1]);
|
148
|
-
// strip color
|
149
|
-
var width = parseInt((o.match(/(\d+)px/) || [])[1]) || 10;
|
150
|
-
// corner width
|
151
|
-
var re = /round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog/;
|
152
|
-
var fx = ((o.match(re) || ['round'])[0]);
|
153
|
-
var fold = /dogfold|bevelfold/.test(o);
|
154
|
-
var edges = {
|
155
|
-
T: 0,
|
156
|
-
B: 1
|
157
|
-
};
|
158
|
-
var opts = {
|
159
|
-
TL: /top|tl|left/.test(o),
|
160
|
-
TR: /top|tr|right/.test(o),
|
161
|
-
BL: /bottom|bl|left/.test(o),
|
162
|
-
BR: /bottom|br|right/.test(o)
|
163
|
-
};
|
164
|
-
if (!opts.TL && !opts.TR && !opts.BL && !opts.BR)
|
165
|
-
opts = {
|
166
|
-
TL: 1,
|
167
|
-
TR: 1,
|
168
|
-
BL: 1,
|
169
|
-
BR: 1
|
170
|
-
};
|
171
|
-
|
172
|
-
// support native rounding
|
173
|
-
if ($.fn.corner.defaults.useNative && fx == 'round' && (radius || moz || webkit) && !cc && !sc) {
|
174
|
-
if (opts.TL) {
|
175
|
-
$this.css(radius ? 'border-top-left-radius': moz ? '-moz-border-radius-topleft': '-webkit-border-top-left-radius', width + 'px');
|
176
|
-
}
|
177
|
-
if (opts.TR) {
|
178
|
-
$this.css(radius ? 'border-top-right-radius': moz ? '-moz-border-radius-topright': '-webkit-border-top-right-radius', width + 'px');
|
179
|
-
}
|
180
|
-
if (opts.BL) {
|
181
|
-
$this.css(radius ? 'border-bottom-left-radius': moz ? '-moz-border-radius-bottomleft': '-webkit-border-bottom-left-radius', width + 'px');
|
182
|
-
}
|
183
|
-
if (opts.BR) {
|
184
|
-
$this.css(radius ? 'border-bottom-right-radius': moz ? '-moz-border-radius-bottomright': '-webkit-border-bottom-right-radius', width + 'px');
|
185
|
-
}
|
186
|
-
return;
|
187
|
-
}
|
188
|
-
|
189
|
-
var strip = document.createElement('div');
|
190
|
-
$(strip).css({
|
191
|
-
overflow: 'hidden',
|
192
|
-
height: '1px',
|
193
|
-
minHeight: '1px',
|
194
|
-
fontSize: '1px',
|
195
|
-
backgroundColor: sc || 'transparent',
|
196
|
-
borderStyle: 'solid'
|
197
|
-
});
|
198
|
-
|
199
|
-
var pad = {
|
200
|
-
T: parseInt($.css(this, 'paddingTop')) || 0,
|
201
|
-
R: parseInt($.css(this, 'paddingRight')) || 0,
|
202
|
-
B: parseInt($.css(this, 'paddingBottom')) || 0,
|
203
|
-
L: parseInt($.css(this, 'paddingLeft')) || 0
|
204
|
-
};
|
205
|
-
|
206
|
-
if (typeof this.style.zoom != undefined) this.style.zoom = 1;
|
207
|
-
// force 'hasLayout' in IE
|
208
|
-
// TODO: IE is losing its border in some cases though still rounding it, investigate.
|
209
|
-
if (!keep) this.style.border = 'none';
|
210
|
-
strip.style.borderColor = cc || gpc(this.parentNode);
|
211
|
-
var cssHeight = $(this).outerHeight();
|
212
|
-
|
213
|
-
for (var j in edges) {
|
214
|
-
var bot = edges[j];
|
215
|
-
// only add stips if needed
|
216
|
-
if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))) {
|
217
|
-
strip.style.borderStyle = 'none ' + (opts[j + 'R'] ? 'solid': 'none') + ' none ' + (opts[j + 'L'] ? 'solid': 'none');
|
218
|
-
var d = document.createElement('div');
|
219
|
-
$(d).addClass('jquery-corner');
|
220
|
-
var ds = d.style;
|
221
|
-
|
222
|
-
// IE always trips up here and breaks rendering elsewhere, so suppress.
|
223
|
-
try {
|
224
|
-
bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild);
|
225
|
-
}
|
226
|
-
catch(a){
|
227
|
-
// don't really care.
|
228
|
-
}
|
229
|
-
|
230
|
-
if (bot && cssHeight != 'auto') {
|
231
|
-
if ($.css(this, 'position') == 'static')
|
232
|
-
this.style.position = 'relative';
|
233
|
-
ds.position = 'absolute';
|
234
|
-
ds.bottom = ds.left = ds.padding = ds.margin = '0';
|
235
|
-
if (expr)
|
236
|
-
ds.setExpression('width', 'this.parentNode.offsetWidth');
|
237
|
-
else
|
238
|
-
ds.width = '100%';
|
239
|
-
}
|
240
|
-
else if (!bot && $.browser.msie) {
|
241
|
-
if ($.css(this, 'position') == 'static')
|
242
|
-
this.style.position = 'relative';
|
243
|
-
ds.position = 'absolute';
|
244
|
-
ds.top = ds.left = ds.right = ds.padding = ds.margin = '0';
|
245
|
-
|
246
|
-
// fix ie6 problem when blocked element has a border width
|
247
|
-
if (expr) {
|
248
|
-
var bw = sz(this, 'borderLeftWidth') + sz(this, 'borderRightWidth');
|
249
|
-
ds.setExpression('width', 'this.parentNode.offsetWidth - ' + bw + '+ "px"');
|
250
|
-
}
|
251
|
-
else
|
252
|
-
ds.width = '100%';
|
253
|
-
}
|
254
|
-
else {
|
255
|
-
ds.position = 'relative';
|
256
|
-
ds.margin = !bot ? '-' + pad.T + 'px -' + pad.R + 'px ' + (pad.T - width) + 'px -' + pad.L + 'px':
|
257
|
-
(pad.B - width) + 'px -' + pad.R + 'px -' + pad.B + 'px -' + pad.L + 'px';
|
258
|
-
}
|
259
|
-
|
260
|
-
for (var i = 0; i < width; i++) {
|
261
|
-
var w = Math.max(0, getWidth(fx, i, width));
|
262
|
-
var e = strip.cloneNode(false);
|
263
|
-
e.style.borderWidth = '0 ' + (opts[j + 'R'] ? w: 0) + 'px 0 ' + (opts[j + 'L'] ? w: 0) + 'px';
|
264
|
-
bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild);
|
265
|
-
}
|
266
|
-
|
267
|
-
if (fold && $.support.boxModel) {
|
268
|
-
if (bot && noBottomFold) continue;
|
269
|
-
for (var c in opts) {
|
270
|
-
if (!opts[c]) continue;
|
271
|
-
if (bot && (c == 'TL' || c == 'TR')) continue;
|
272
|
-
if (!bot && (c == 'BL' || c == 'BR')) continue;
|
273
|
-
|
274
|
-
var common = {
|
275
|
-
position: 'absolute',
|
276
|
-
border: 'none',
|
277
|
-
margin: 0,
|
278
|
-
padding: 0,
|
279
|
-
overflow: 'hidden',
|
280
|
-
backgroundColor: strip.style.borderColor
|
281
|
-
};
|
282
|
-
var $horz = $('<div/>').css(common).css({
|
283
|
-
width: width + 'px',
|
284
|
-
height: '1px'
|
285
|
-
});
|
286
|
-
switch (c) {
|
287
|
-
case 'TL':
|
288
|
-
$horz.css({bottom: 0, left: 0});
|
289
|
-
break;
|
290
|
-
case 'TR':
|
291
|
-
$horz.css({bottom: 0, right: 0});
|
292
|
-
break;
|
293
|
-
case 'BL':
|
294
|
-
$horz.css({top: 0, left: 0});
|
295
|
-
break;
|
296
|
-
case 'BR':
|
297
|
-
$horz.css({top: 0, right: 0});
|
298
|
-
break;
|
299
|
-
}
|
300
|
-
d.appendChild($horz[0]);
|
301
|
-
|
302
|
-
var $vert = $('<div/>').css(common).css({
|
303
|
-
top: 0,
|
304
|
-
bottom: 0,
|
305
|
-
width: '1px',
|
306
|
-
height: width + 'px'
|
307
|
-
});
|
308
|
-
switch (c) {
|
309
|
-
case 'TL':
|
310
|
-
$vert.css({left: width});
|
311
|
-
break;
|
312
|
-
case 'TR':
|
313
|
-
$vert.css({right: width});
|
314
|
-
break;
|
315
|
-
case 'BL':
|
316
|
-
$vert.css({left: width});
|
317
|
-
break;
|
318
|
-
case 'BR':
|
319
|
-
$vert.css({right: width});
|
320
|
-
break;
|
321
|
-
}
|
322
|
-
d.appendChild($vert[0]);
|
323
|
-
}
|
324
|
-
}
|
325
|
-
}
|
326
|
-
}
|
327
|
-
});
|
328
|
-
};
|
329
|
-
|
330
|
-
$.fn.uncorner = function() {
|
331
|
-
if (radius || moz || webkit)
|
332
|
-
this.css(radius ? 'border-radius': moz ? '-moz-border-radius': '-webkit-border-radius', 0);
|
333
|
-
$('div.jquery-corner', this).remove();
|
334
|
-
return this;
|
335
|
-
};
|
336
|
-
|
337
|
-
// expose options
|
338
|
-
$.fn.corner.defaults = {
|
339
|
-
useNative: true,
|
340
|
-
// true if plugin should attempt to use native browser support for border radius rounding
|
341
|
-
metaAttr: 'data-corner'
|
342
|
-
// name of meta attribute to use for options
|
343
|
-
};
|
344
|
-
|
345
|
-
})(jQuery);
|
@@ -1,55 +0,0 @@
|
|
1
|
-
body {
|
2
|
-
margin: 0px;
|
3
|
-
}
|
4
|
-
#page, #site_bar_content, footer, header {
|
5
|
-
width: 1000px;
|
6
|
-
margin: 0px auto;
|
7
|
-
}
|
8
|
-
#body_content_left {
|
9
|
-
float: left;
|
10
|
-
width: 600px;
|
11
|
-
.inner {
|
12
|
-
padding-right: 10px;
|
13
|
-
}
|
14
|
-
}
|
15
|
-
#body_content_right {
|
16
|
-
float: right;
|
17
|
-
width: 400px;
|
18
|
-
.inner {
|
19
|
-
padding-left: 10px;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
#body_content.no_body_content_left #body_content_right,
|
23
|
-
#body_content.no_body_content_right #body_content_left {
|
24
|
-
width: 100%;
|
25
|
-
padding-left: 0px;
|
26
|
-
padding-right: 0px;
|
27
|
-
}
|
28
|
-
.menu {
|
29
|
-
ul {
|
30
|
-
margin: 0px;
|
31
|
-
padding: 0px;
|
32
|
-
}
|
33
|
-
li {
|
34
|
-
padding: 0px;
|
35
|
-
margin: 0px 9px 0px 0px;
|
36
|
-
list-style: none;
|
37
|
-
float: left;
|
38
|
-
&.last {
|
39
|
-
margin-right: 0px;
|
40
|
-
}
|
41
|
-
&.selected {
|
42
|
-
> a {
|
43
|
-
font-weight: bold;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
.page_not_live {
|
49
|
-
border: 1px solid #A00027;
|
50
|
-
color: #A00027;
|
51
|
-
background: #FFB1B1;
|
52
|
-
padding:3px 9px;
|
53
|
-
font-weight:bold;
|
54
|
-
width:auto;
|
55
|
-
}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
<% if Refinery::Core.ie6_upgrade_message_enabled -%>
|
2
|
-
<% unless admin? %>
|
3
|
-
<!--[if lte IE 6]>
|
4
|
-
<div id="ie6msg_wrapper">
|
5
|
-
<div id="ie6msg">
|
6
|
-
<h4>Did you know that your browser is out of date?</h4>
|
7
|
-
<div id='ie6message'>
|
8
|
-
<p>
|
9
|
-
To get the best possible experience using our website we recommend that you upgrade your browser to a newer version. The current version is
|
10
|
-
<a class="getie8" href="http://upgradeie.s3.amazonaws.com/eng/index.html">Internet Explorer 8</a>.
|
11
|
-
The upgrade is free. If you're using a PC at work you should contact your IT administrator.
|
12
|
-
</p>
|
13
|
-
<p>
|
14
|
-
If you want to you may also try some other popular and <strong>free</strong> Internet browsers like:<br/>
|
15
|
-
<a class="ie6expl" href="http://www.google.com/chrome" target='_blank'>Google Chrome</a>,
|
16
|
-
<a class="ie6expl" href="http://www.apple.com/safari/download/" target='_blank'>Safari</a>,
|
17
|
-
<a class="ie6expl" href="http://getfirefox.com" target='_blank'>Firefox</a> or
|
18
|
-
<a class="ie6expl" href="http://www.opera.com" target='_blank'>Opera</a>
|
19
|
-
</p>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<![endif]-->
|
24
|
-
<% else %>
|
25
|
-
<!--[if lte IE 8]>
|
26
|
-
<div id='upgrade_wrapper'>
|
27
|
-
<h2>Want to have a better experience with Refinery?</h2>
|
28
|
-
<p>
|
29
|
-
To get the best possible experience using Refinery, we recommend that you switch your web browser.
|
30
|
-
</p>
|
31
|
-
<p>
|
32
|
-
There are a number of web browsers available that will give you a better experience and they are all available <strong>free of charge</strong>. Installing a new web browser will not remove Internet Explorer which you will still be able to use when you need to.
|
33
|
-
</p>
|
34
|
-
<p>
|
35
|
-
<ul>
|
36
|
-
<li>
|
37
|
-
<a class="ie6expl" href="http://www.google.com/chrome" target='_blank'>Google Chrome</a>
|
38
|
-
</li>
|
39
|
-
<li>
|
40
|
-
<a class="ie6expl" href="http://www.apple.com/safari/download/" target='_blank'>Apple Safari</a>
|
41
|
-
</li>
|
42
|
-
<li>
|
43
|
-
<a class="ie6expl" href="http://getfirefox.com" target='_blank'>Mozilla Firefox</a>
|
44
|
-
</li>
|
45
|
-
<li>
|
46
|
-
<a class="ie6expl" href="http://www.opera.com" target='_blank'>Opera</a>
|
47
|
-
</li>
|
48
|
-
</ul>
|
49
|
-
</p>
|
50
|
-
</div>
|
51
|
-
<![endif]-->
|
52
|
-
<% content_for :javascripts do %>
|
53
|
-
<script>
|
54
|
-
$(document).ready(function() {
|
55
|
-
$('#flash.flash_message:has("#upgrade_wrapper") #flash_close').click(function(e) {
|
56
|
-
e.preventDefault();
|
57
|
-
$.get('<%= refinery.admin_disable_upgrade_message_path %>');
|
58
|
-
});
|
59
|
-
});
|
60
|
-
</script>
|
61
|
-
<% end %>
|
62
|
-
<% end %>
|
63
|
-
<% end -%>
|