bhf 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/bhf/entries_controller.rb +2 -2
- data/app/views/bhf/entries/form/column/_markdown.haml +16 -3
- data/app/views/bhf/pages/_search.haml +1 -1
- data/lib/bhf/pagination.rb +1 -1
- data/lib/bhf/view_helpers.rb +4 -2
- data/public/javascripts/bhf.js +1 -1
- data/public/stylesheets/bhf.css +1 -1
- metadata +4 -4
@@ -8,8 +8,21 @@
|
|
8
8
|
#wmd-editor.wmd-pane
|
9
9
|
#wmd-button-bar
|
10
10
|
= f.text_area field.name, :id => 'wmd-input', :class => 'markdown'
|
11
|
-
%h6
|
11
|
+
%h6.preview_switch
|
12
|
+
Preview
|
13
|
+
%span#toggle_html_preview HTML
|
14
|
+
%span#toggle_live_preview.active Live
|
12
15
|
#wmd-preview.wmd-panel
|
13
|
-
|
14
|
-
#wmd-output.wmd-panel
|
16
|
+
#wmd-output.wmd-panel.hide
|
15
17
|
= javascript_include_tag '/javascripts/bhf_includes/wmd.js'
|
18
|
+
:javascript
|
19
|
+
var toggleMdPreview = function(e){
|
20
|
+
var a = e.target.id === 'toggle_html_preview';
|
21
|
+
$('wmd-preview').toggleClass('hide', a);
|
22
|
+
$('wmd-output').toggleClass('hide', !a);
|
23
|
+
$('toggle_live_preview').toggleClass('active', !a);
|
24
|
+
$('toggle_html_preview').toggleClass('active', a);
|
25
|
+
};
|
26
|
+
$('toggle_live_preview').addEvent('click', toggleMdPreview);
|
27
|
+
$('toggle_html_preview').addEvent('click', toggleMdPreview);
|
28
|
+
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
- if p && p[:search].is_a?(Hash)
|
9
9
|
- p[:search].each do |key, value|
|
10
|
-
= s.hidden_field key, :value => value, :id => nil
|
10
|
+
= s.hidden_field key, :value => value, :id => nil, :class => (:hidden_search if key == 'text')
|
11
11
|
|
12
12
|
- if platform.custom_search
|
13
13
|
= render :partial => platform.custom_search, :locals => { :platform => platform, :f => f, :s => s, :p => p }
|
data/lib/bhf/pagination.rb
CHANGED
@@ -20,7 +20,7 @@ module Bhf
|
|
20
20
|
:container => false
|
21
21
|
})
|
22
22
|
links = "#{load_more(platform)} #{page_links}"
|
23
|
-
elsif platform.objects.total_pages == 1 && platform.objects.size > @
|
23
|
+
elsif platform.objects.total_pages == 1 && platform.objects.size + @offset_to_add > @offset_per_page
|
24
24
|
links = load_less(platform)
|
25
25
|
end
|
26
26
|
|
data/lib/bhf/view_helpers.rb
CHANGED
@@ -6,8 +6,10 @@ module Bhf
|
|
6
6
|
return unless session[Bhf::Engine.config.session_auth_name.to_s] == true
|
7
7
|
|
8
8
|
options[:platform_name] ||= object.class.to_s.pluralize.downcase
|
9
|
-
|
10
|
-
|
9
|
+
|
10
|
+
if object.respond_to?(:'bhf_can_edit?', true)
|
11
|
+
return unless object.bhf_can_edit?(options)
|
12
|
+
end
|
11
13
|
|
12
14
|
render :partial => 'bhf/helper/frontend_edit', :locals => { :platform_name => options[:platform_name], :object => object }
|
13
15
|
end
|
data/public/javascripts/bhf.js
CHANGED
@@ -596,4 +596,4 @@ if(!r){r=[];}for(var h=0,g=m.length;h<g;h++){if(r.contains(m[h])){continue;}r.in
|
|
596
596
|
return this;},get:function(i,h,g){if(h){i+="."+h;}return f.get(i,g);}});})();Locale.define("en-US","Date",{months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_abbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],days_abbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dateOrder:["month","date","year"],shortDate:"%m/%d/%Y",shortTime:"%I:%M%p",AM:"AM",PM:"PM",firstDayOfWeek:0,ordinal:function(a){return(a>3&&a<21)?"th":["th","st","nd","rd","th"][Math.min(a%10,4)];
|
597
597
|
},lessThanMinuteAgo:"less than a minute ago",minuteAgo:"about a minute ago",minutesAgo:"{delta} minutes ago",hourAgo:"about an hour ago",hoursAgo:"about {delta} hours ago",dayAgo:"1 day ago",daysAgo:"{delta} days ago",weekAgo:"1 week ago",weeksAgo:"{delta} weeks ago",monthAgo:"1 month ago",monthsAgo:"{delta} months ago",yearAgo:"1 year ago",yearsAgo:"{delta} years ago",lessThanMinuteUntil:"less than a minute from now",minuteUntil:"about a minute from now",minutesUntil:"{delta} minutes from now",hourUntil:"about an hour from now",hoursUntil:"about {delta} hours from now",dayUntil:"1 day from now",daysUntil:"{delta} days from now",weekUntil:"1 week from now",weeksUntil:"{delta} weeks from now",monthUntil:"1 month from now",monthsUntil:"{delta} months from now",yearUntil:"1 year from now",yearsUntil:"{delta} years from now"});
|
598
598
|
Locale.define("de-DE","Date",{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],months_abbr:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],days_abbr:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],dateOrder:["date","month","year"],shortDate:"%d.%m.%Y",shortTime:"%H:%M",AM:"vormittags",PM:"nachmittags",firstDayOfWeek:1,ordinal:".",lessThanMinuteAgo:"vor weniger als einer Minute",minuteAgo:"vor einer Minute",minutesAgo:"vor {delta} Minuten",hourAgo:"vor einer Stunde",hoursAgo:"vor {delta} Stunden",dayAgo:"vor einem Tag",daysAgo:"vor {delta} Tagen",weekAgo:"vor einer Woche",weeksAgo:"vor {delta} Wochen",monthAgo:"vor einem Monat",monthsAgo:"vor {delta} Monaten",yearAgo:"vor einem Jahr",yearsAgo:"vor {delta} Jahren",lessThanMinuteUntil:"in weniger als einer Minute",minuteUntil:"in einer Minute",minutesUntil:"in {delta} Minuten",hourUntil:"in ca. einer Stunde",hoursUntil:"in ca. {delta} Stunden",dayUntil:"in einem Tag",daysUntil:"in {delta} Tagen",weekUntil:"in einer Woche",weeksUntil:"in {delta} Wochen",monthUntil:"in einem Monat",monthsUntil:"in {delta} Monaten",yearUntil:"in einem Jahr",yearsUntil:"in {delta} Jahren"});
|
599
|
-
(function($){window.rails={applyEvents:function(el){el=$(el||document.body);var apply=function(selector,action,callback){el.getElements(selector).addEvent(action,callback)};apply('form[data-remote="true"]',"submit",rails.handleRemote);apply('a[data-remote="true"], input[data-remote="true"]',"click",rails.handleRemote);apply("a[data-method][data-remote!=true]","click",function(e){e.preventDefault();if(rails.confirmed(this)){var form=new Element("form",{method:"post",action:this.get("href"),styles:{display:"none"}}).inject(this,"after");var methodInput=new Element("input",{type:"hidden",name:"_method",value:this.get("data-method")});var csrfInput=new Element("input",{type:"hidden",name:rails.csrf.param,value:rails.csrf.token});form.adopt(methodInput,csrfInput).submit()}});var noMethodNorRemoteConfirm=":not([data-method]):not([data-remote=true])[data-confirm]";apply("a"+noMethodNorRemoteConfirm+",input"+noMethodNorRemoteConfirm,"click",function(){return rails.confirmed(this)})},getCsrf:function(name){var meta=document.getElement("meta[name=csrf-"+name+"]");return(meta?meta.get("content"):null)},confirmed:function(el){var confirmMessage=el.get("data-confirm");if(confirmMessage&&!confirm(confirmMessage)){return false}return true},disable:function(el){var button=el.get("data-disable-with")?el:el.getElement("[data-disable-with]");if(button){var enableWith=button.get("value");el.addEvent("ajax:complete",function(){button.set({value:enableWith,disabled:false})});button.set({value:button.get("data-disable-with"),disabled:true})}},handleRemote:function(e){e.preventDefault();if(rails.confirmed(this)){this.request=new Request.Rails(this);rails.disable(this);this.request.send()}}};Request.Rails=new Class({Extends:Request,initialize:function(element,options){this.el=element;this.parent(Object.merge({},{method:this.el.get("method")||this.el.get("data-method")||"get",url:this.el.get("action")||this.el.get("href")},options));this.headers.Accept="*/*";this.addRailsEvents()},send:function(options){this.el.fireEvent("ajax:before");if(this.el.get("tag")=="form"){this.options.data=this.el}this.parent(options);this.el.fireEvent("ajax:after",this.xhr)},addRailsEvents:function(){this.addEvent("request",function(){this.el.fireEvent("ajax:loading",this.xhr)});this.addEvent("success",function(){this.el.fireEvent("ajax:success",this.xhr)});this.addEvent("complete",function(){this.el.fireEvent("ajax:complete",this.xhr);this.el.fireEvent("ajax:loaded",this.xhr)});this.addEvent("failure",function(){this.el.fireEvent("ajax:failure",this.xhr)})}})})(document.id);window.addEvent("domready",function(){rails.csrf={token:rails.getCsrf("token"),param:rails.getCsrf("param")};rails.applyEvents()});var BrowserUpdate=new Class({initialize:function(op,test){var b,jsv=5,n=window.navigator;this.op=op||{};this.op.l=op.l||n.language||n.userLanguage||document.documentElement.getAttribute("lang")||"en";this.op.vsakt={i:8,f:3.6,o:10.6,s:5,n:10};this.op.vsdefault={i:6,f:2,o:9.64,s:3,n:10};this.op.vs=op.vs||this.op.vsdefault;for(b in this.op.vsakt){if(this.op.vs[b]>=this.op.vsakt[b]){this.op.vs[b]=this.op.vsdefault[b]}}if(!op.reminder||op.reminder<0.1){this.op.reminder=0}else{this.op.reminder=op.reminder||24}this.op.onshow=op.onshow||function(o){};this.op.url=op.url||"http://browser-update.org/update.html";this.op.pageurl=op.pageurl||window.location.hostname||"unknown";this.op.newwindow=op.newwindow||false;this.op.test=test||op.test||false;if(window.location.hash=="#test-bu"){this.op.test=true}function getBrowser(){var n,v,t,ua=navigator.userAgent,names={i:"Internet Explorer",f:"Firefox",o:"Opera",s:"Apple Safari",n:"Netscape Navigator",c:"Chrome",x:"Other"};if(/like firefox|chromeframe|seamonkey|opera mini|meego|netfront|moblin|maemo|arora|camino|flot|k-meleon|fennec|kazehakase|galeon|android|mobile|iphone|ipod|ipad|symbian|webos/i.test(ua)){n="x"}else{if(/MSIE (\d+\.\d+);/.test(ua)){n="i"}else{if(/Chrome.(\d+\.\d+)/i.test(ua)){n="c"}else{if(/Firefox.(\d+\.\d+)/i.test(ua)){n="f"}else{if(/Version.(\d+.\d+).{0,10}Safari/i.test(ua)){n="s"}else{if(/Safari.(\d+)/i.test(ua)){n="so"}else{if(/Opera.*Version.(\d+\.\d+)/i.test(ua)){n="o"}else{if(/Opera.(\d+\.\d+)/i.test(ua)){n="o"}else{if(/Netscape.(\d+)/i.test(ua)){n="n"}else{return{n:"x",v:0,t:names[n]}}}}}}}}}}if(n=="x"){return{n:"x",v:0,t:names[n]}}v=new Number(RegExp.$1);if(n=="so"){v=((v<100)&&1)||((v<130)&&1.2)||((v<320)&&1.3)||((v<520)&&2)||((v<524)&&3)||((v<526)&&3.2)||4;n="s"}if(n=="i"&&v==7&&window.XDomainRequest){v=8}return{n:n,v:v,t:names[n]+" "+v}}this.op.browser=getBrowser();if(!this.op.test&&(!this.op.browser||!this.op.browser.n||this.op.browser.n=="x"||this.op.browser.n=="c"||document.cookie.indexOf("browserupdateorg=pause")>-1||this.op.browser.v>this.op.vs[this.op.browser.n])){return}if(this.op.reminder>0){var d=new Date(new Date().getTime()+1000*3600*this.op.reminder);document.cookie="browserupdateorg=pause; expires="+d.toGMTString()+"; path=/"}var ll=this.op.l.substr(0,2);var languages="de,en";if(languages.indexOf(ll)!==false){this.op.url="http://browser-update.org/"+ll+"/update.html#"+jsv}var tar="";if(this.op.newwindow){tar=' target="_blank"'}function busprintf(){var args=arguments;var data=args[0];for(var k=1;k<args.length;++k){data=data.replace(/%s/,args[k])}return data}ll=(window.Locale)?Locale.getCurrent().name:"en-US";var t="Your browser (%s) is <b>out of date</b>. It has known <b>security flaws</b> and may <b>not display all features</b> of this and other websites. <a%s>Learn how to update your browser</a>";if(ll=="de-DE"){t="Sie verwenden einen <b>veralteten Browser</b> (%s) mit <b>Sicherheitsschwachstellen</b> und <b>können nicht alle Funktionen dieser Webseite nutzen</b>. <a%s>Hier erfahren Sie, wie einfach Sie Ihren Browser aktualisieren können</a>."}if(op.text){t=op.text}this.op.text=busprintf(t,this.op.browser.t,' href="'+this.op.url+'"'+tar);var div=document.createElement("div");this.op.div=div;div.id="buorg";div.className="buorg";div.innerHTML="<div>"+this.op.text+'<div id="buorgclose">X</div></div>';var sheet=document.createElement("style");var style=".buorg {position:absolute;z-index:111111; width:100%; top:0px; left:0px; border-bottom:1px solid #A29330; background:#FDF2AB no-repeat 10px center url(http://browser-update.org/img/dialog-warning.gif); text-align:left; cursor:pointer; font-family: Arial,Helvetica,sans-serif; color:#000; font-size: 12px;} .buorg div { padding:5px 36px 5px 40px; } .buorg a,.buorg a:visited {color:#E25600; text-decoration: underline;} #buorgclose { position: absolute; right: .5em; top:.2em; height: 20px; width: 12px; font-weight: bold;font-size:14px; padding:0; }";document.body.insertBefore(div,document.body.firstChild);document.getElementsByTagName("head")[0].appendChild(sheet);try{sheet.innerText=style;sheet.innerHTML=style}catch(e){try{sheet.styleSheet.cssText=style}catch(e){return}}var me=this;div.onclick=function(){if(me.op.newwindow){window.open(me.op.url,"_blank")}else{window.location.href=me.op.url}return false};div.getElementsByTagName("a")[0].onclick=function(e){var e=e||window.event;if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}return true};this.op.bodymt=document.body.style.paddingTop;document.body.style.paddingTop=(div.clientHeight)+"px";document.getElementById("buorgclose").onclick=function(e){var e=e||window.event;if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}me.op.div.style.display="none";document.body.style.paddingTop=me.op.bodymt;return true};op.onshow(this.op)}});var Ajaxify=new Class({version:0.2,Implements:[Options,Events],options:{events:{loading:{name:"ajax:loading",text:"Loading…"},success:{name:"ajax:success",text:"Changes successfully saved!"},failure:{name:"ajax:failure",text:"Oops, something went wrong…"}},holder:new Element("div#ajax_holder"),fadeOutDuration:2000},initialize:function(_options){this.setOptions(_options);this.holder=this.options.holder.inject(document.body)},applyEvents:function(el){el=document.id(el||document.body);var apply=function(action,callback){el.getElements('[data-remote="true"]').addEvent(action,callback)};apply(this.options.events.loading.name,this.loading.bind(this));apply(this.options.events.success.name,this.success.bind(this));apply(this.options.events.failure.name,this.failure.bind(this))},loading:function(xhr){this.setMessage("loading",false)},success:function(xhr){this.setMessage("success",true)},failure:function(xhr){this.setMessage("failure",true)},setMessage:function(status,fadeOut){this.holder.set("text",this.options.events[status].text).set("class",status);if(fadeOut){this.holder.addClass("fadeout");setTimeout(function(){this.holder.erase("class")}.bind(this),this.options.fadeOutDuration)}}});var AjaxEdit=new Class({version:0.2,options:{holderParent:document.body},Implements:[Options,Events],holder:new Element("div.quick_edit_holder"),initialize:function(_options){this.setOptions(_options);this.holder.addEvents({"click:relay(.open)":function(e){e.preventDefault();location.href=this.wrapElement.getElement("a").get("href")}.bind(this),"click:relay(.cancel)":function(e){e.preventDefault();this.close()}.bind(this),"click:relay(.save_and_next)":function(e){e.preventDefault();this.submit(["successAndChange","successAndNext"])}.bind(this),"click:relay(.save)":function(e){e.preventDefault();this.submit(["successAndChange"])}.bind(this),"submit:relay(form)":function(e){e.preventDefault();this.submit(["successAndChange"])}.bind(this)})},startEdit:function(element,wrapElement){this.clean();this.wrapElement=wrapElement?wrapElement:element;this.wrapElement.addClass("live_edit");this.fireEvent("startRequest");new Request.HTML({method:"get",evalScripts:false,url:element.get("href"),onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){this.injectForm(responseHTML);eval(responseJavaScript)}.bind(this)}).send()},submit:function(eventNames){var form=this.holder.getElement("form");this.fireEvent("beforeSubmit");new Request.JSON({method:form.get("method"),url:form.get("action"),evalScripts:true,onRequest:function(){this.disableButtons()}.bind(this),onFailure:function(invalidForm){this.injectForm(invalidForm.response);invalidForm.response.stripScripts(function(script){eval(script)})}.bind(this),onSuccess:function(json){if(!eventNames.contains("successAndNext")){this.close()}eventNames.each(function(eventName){this.fireEvent(eventName,[json])}.bind(this));this.fireEvent("save")}.bind(this)}).send({data:form})},disableButtons:function(){this.holder.getElements(".open, .cancel, .save_and_next, .save").set("disabled","disabled")},clean:function(){document.body.getElements(".live_edit").removeClass("live_edit")},close:function(){this.clean();this.holder.dispose()},injectForm:function(form){this.holder.innerHTML=form;this.holder.inject(this.options.holderParent);this.fireEvent("formInjected",[this.holder])}});(function(){var blockEls=/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|SCRIPT|NOSCRIPT|STYLE)$/i;var urlRegex=/^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i;var protectRegex=/<(script|noscript|style)[\u0000-\uFFFF]*?<\/(script|noscript|style)>/g;this.MooEditable=new Class({Implements:[Events,Options],options:{toolbar:true,cleanup:true,paragraphise:true,xhtml:true,semantics:true,actions:"bold italic underline strikethrough | insertunorderedlist insertorderedlist indent outdent | undo redo | createlink unlink | urlimage | toggleview",handleSubmit:true,handleLabel:true,disabled:false,baseCSS:"html{ height: 100%; cursor: text; } body{ font-family: sans-serif; }",extraCSS:"",externalCSS:"",html:'<!DOCTYPE html><html><head><meta charset="UTF-8">{BASEHREF}<style>{BASECSS} {EXTRACSS}</style>{EXTERNALCSS}</head><body></body></html>',rootElement:"p",baseURL:"",dimensions:null},initialize:function(el,options){this.setOptions(options);this.textarea=document.id(el);this.textarea.store("MooEditable",this);this.actions=this.options.actions.clean().split(" ");this.keys={};this.dialogs={};this.protectedElements=[];this.actions.each(function(action){var act=MooEditable.Actions[action];if(!act){return}if(act.options){var key=act.options.shortcut;if(key){this.keys[key]=action}}if(act.dialogs){Object.each(act.dialogs,function(dialog,name){dialog=dialog.attempt(this);dialog.name=action+":"+name;if(typeOf(this.dialogs[action])!="object"){this.dialogs[action]={}}this.dialogs[action][name]=dialog},this)}if(act.events){Object.each(act.events,function(fn,event){this.addEvent(event,fn)},this)}}.bind(this));this.render()},toElement:function(){return this.textarea},render:function(){var self=this;var dimensions=this.options.dimensions||this.textarea.getSize();this.container=new Element("div",{id:(this.textarea.id)?this.textarea.id+"-mooeditable-container":null,"class":"mooeditable-container",styles:{width:dimensions.x}});this.textarea.addClass("mooeditable-textarea").setStyle("height",dimensions.y);this.iframe=new IFrame({"class":"mooeditable-iframe",frameBorder:0,src:'javascript:""',styles:{height:dimensions.y}});this.toolbar=new MooEditable.UI.Toolbar({onItemAction:function(){var args=Array.from(arguments);var item=args[0];self.action(item.name,args)}});this.attach.delay(1,this);if(this.options.handleLabel&&this.textarea.id){$$('label[for="'+this.textarea.id+'"]').addEvent("click",function(e){if(self.mode!="iframe"){return}e.preventDefault();self.focus()})}if(this.options.handleSubmit){this.form=this.textarea.getParent("form");if(!this.form){return}this.form.addEvent("submit",function(){if(self.mode=="iframe"){self.saveContent()}})}this.fireEvent("render",this)},attach:function(){var self=this;this.mode="iframe";this.editorDisabled=false;this.container.wraps(this.textarea);this.textarea.setStyle("display","none");this.iframe.setStyle("display","").inject(this.textarea,"before");Object.each(this.dialogs,function(action,name){Object.each(action,function(dialog){document.id(dialog).inject(self.iframe,"before");var range;dialog.addEvents({open:function(){range=self.selection.getRange();self.editorDisabled=true;self.toolbar.disable(name);self.fireEvent("dialogOpen",this)},close:function(){self.toolbar.enable();self.editorDisabled=false;self.focus();if(range){self.selection.setRange(range)}self.fireEvent("dialogClose",this)}})})});this.win=this.iframe.contentWindow;this.doc=this.win.document;if(Browser.firefox){this.doc.designMode="On"}var docHTML=this.options.html.substitute({BASECSS:this.options.baseCSS,EXTRACSS:this.options.extraCSS,EXTERNALCSS:(this.options.externalCSS)?'<link rel="stylesheet" href="'+this.options.externalCSS+'">':"",BASEHREF:(this.options.baseURL)?'<base href="'+this.options.baseURL+'" />':""});this.doc.open();this.doc.write(docHTML);this.doc.close();(Browser.ie)?this.doc.body.contentEditable=true:this.doc.designMode="On";Object.append(this.win,new Window);Object.append(this.doc,new Document);if(Browser.Element){var winElement=this.win.Element.prototype;for(var method in Element){if(!method.test(/^[A-Z]|\$|prototype|mooEditable/)){winElement[method]=Element.prototype[method]}}}else{document.id(this.doc.body)}this.setContent(this.textarea.get("value"));this.doc.addEvents({mouseup:this.editorMouseUp.bind(this),mousedown:this.editorMouseDown.bind(this),mouseover:this.editorMouseOver.bind(this),mouseout:this.editorMouseOut.bind(this),mouseenter:this.editorMouseEnter.bind(this),mouseleave:this.editorMouseLeave.bind(this),contextmenu:this.editorContextMenu.bind(this),click:this.editorClick.bind(this),dblclick:this.editorDoubleClick.bind(this),keypress:this.editorKeyPress.bind(this),keyup:this.editorKeyUp.bind(this),keydown:this.editorKeyDown.bind(this),focus:this.editorFocus.bind(this),blur:this.editorBlur.bind(this)});this.win.addEvents({focus:this.editorFocus.bind(this),blur:this.editorBlur.bind(this)});["cut","copy","paste"].each(function(event){self.doc.body.addListener(event,self["editor"+event.capitalize()].bind(self))});this.textarea.addEvent("keypress",this.textarea.retrieve("mooeditable:textareaKeyListener",this.keyListener.bind(this)));if(Browser.firefox2){this.doc.addEvent("focus",function(){self.win.fireEvent("focus").focus()})}if(this.doc.addEventListener){this.doc.addEventListener("focus",function(){self.win.fireEvent("focus")},true)}if(!Browser.ie&&!Browser.opera){var styleCSS=function(){self.execute("styleWithCSS",false,false);self.doc.removeEvent("focus",styleCSS)};this.win.addEvent("focus",styleCSS)}if(this.options.toolbar){document.id(this.toolbar).inject(this.container,"top");this.toolbar.render(this.actions)}if(this.options.disabled){this.disable()}this.selection=new MooEditable.Selection(this.win);this.oldContent=this.getContent();this.fireEvent("attach",this);return this},detach:function(){this.saveContent();this.textarea.setStyle("display","").removeClass("mooeditable-textarea").inject(this.container,"before");this.textarea.removeEvent("keypress",this.textarea.retrieve("mooeditable:textareaKeyListener"));this.container.dispose();this.fireEvent("detach",this);return this},enable:function(){this.editorDisabled=false;this.toolbar.enable();return this},disable:function(){this.editorDisabled=true;this.toolbar.disable();return this},editorFocus:function(e){this.oldContent="";this.fireEvent("editorFocus",[e,this])},editorBlur:function(e){this.oldContent=this.saveContent().getContent();this.fireEvent("editorBlur",[e,this])},editorMouseUp:function(e){if(this.editorDisabled){e.stop();return}if(this.options.toolbar){this.checkStates()}this.fireEvent("editorMouseUp",[e,this])},editorMouseDown:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorMouseDown",[e,this])},editorMouseOver:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorMouseOver",[e,this])},editorMouseOut:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorMouseOut",[e,this])},editorMouseEnter:function(e){if(this.editorDisabled){e.stop();return}if(this.oldContent&&this.getContent()!=this.oldContent){this.focus();this.fireEvent("editorPaste",[e,this])}this.fireEvent("editorMouseEnter",[e,this])},editorMouseLeave:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorMouseLeave",[e,this])},editorContextMenu:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorContextMenu",[e,this])},editorClick:function(e){if(Browser.safari||Browser.chrome){var el=e.target;if(Element.get(el,"tag")=="img"){if(this.options.baseURL){if(el.getProperty("src").indexOf("http://")==-1){el.setProperty("src",this.options.baseURL+el.getProperty("src"))}}this.selection.selectNode(el);this.checkStates()}}this.fireEvent("editorClick",[e,this])},editorDoubleClick:function(e){this.fireEvent("editorDoubleClick",[e,this])},editorKeyPress:function(e){if(this.editorDisabled){e.stop();return}this.keyListener(e);this.fireEvent("editorKeyPress",[e,this])},editorKeyUp:function(e){if(this.editorDisabled){e.stop();return}var c=e.code;if(this.options.toolbar&&(/^enter|left|up|right|down|delete|backspace$/i.test(e.key)||(c>=33&&c<=36)||c==45||e.meta||e.control)){if(Browser.ie6){clearTimeout(this.checkStatesDelay);this.checkStatesDelay=this.checkStates.delay(500,this)}else{this.checkStates()}}this.fireEvent("editorKeyUp",[e,this])},editorKeyDown:function(e){if(this.editorDisabled){e.stop();return}if(e.key=="enter"){if(this.options.paragraphise){if(e.shift&&(Browser.safari||Browser.chrome)){var s=this.selection;var r=s.getRange();var br=this.doc.createElement("br");r.insertNode(br);r.setStartAfter(br);r.setEndAfter(br);s.setRange(r);if(s.getSelection().focusNode==br.previousSibling){var nbsp=this.doc.createTextNode("\u00a0");var p=br.parentNode;var ns=br.nextSibling;(ns)?p.insertBefore(nbsp,ns):p.appendChild(nbsp);s.selectNode(nbsp);s.collapse(1)}this.win.scrollTo(0,Element.getOffsets(s.getRange().startContainer).y);e.preventDefault()}else{if(Browser.firefox||Browser.safari||Browser.chrome){var node=this.selection.getNode();var isBlock=Element.getParents(node).include(node).some(function(el){return el.nodeName.test(blockEls)});if(!isBlock){this.execute("insertparagraph")}}}}else{if(Browser.ie){var r=this.selection.getRange();var node=this.selection.getNode();if(r&&node.get("tag")!="li"){this.selection.insertContent("<br>");this.selection.collapse(false)}e.preventDefault()}}}if(Browser.opera){var ctrlmeta=e.control||e.meta;if(ctrlmeta&&e.key=="x"){this.fireEvent("editorCut",[e,this])}else{if(ctrlmeta&&e.key=="c"){this.fireEvent("editorCopy",[e,this])}else{if((ctrlmeta&&e.key=="v")||(e.shift&&e.code==45)){this.fireEvent("editorPaste",[e,this])}}}}this.fireEvent("editorKeyDown",[e,this])},editorCut:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorCut",[e,this])},editorCopy:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorCopy",[e,this])},editorPaste:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorPaste",[e,this])},keyListener:function(e){var key=(Browser.Platform.mac)?e.meta:e.control;if(!key||!this.keys[e.key]){return}e.preventDefault();var item=this.toolbar.getItem(this.keys[e.key]);item.action(e)},focus:function(){(this.mode=="iframe"?this.win:this.textarea).focus();this.fireEvent("focus",this);return this},action:function(command,args){var action=MooEditable.Actions[command];if(action.command&&typeOf(action.command)=="function"){action.command.apply(this,args)}else{this.focus();this.execute(command,false,args);if(this.mode=="iframe"){this.checkStates()}}},execute:function(command,param1,param2){if(this.busy){return}this.busy=true;this.doc.execCommand(command,param1,param2);this.saveContent();this.busy=false;return false},toggleView:function(){this.fireEvent("beforeToggleView",this);if(this.mode=="textarea"){this.mode="iframe";this.iframe.setStyle("display","");this.setContent(this.textarea.value);this.textarea.setStyle("display","none")}else{this.saveContent();this.mode="textarea";this.textarea.setStyle("display","");this.iframe.setStyle("display","none")}this.fireEvent("toggleView",this);this.focus.delay(10,this);return this},getContent:function(){var protect=this.protectedElements;var html=this.doc.body.get("html").replace(/<!-- mooeditable:protect:([0-9]+) -->/g,function(a,b){return protect[b.toInt()]});return this.cleanup(this.ensureRootElement(html))},setContent:function(content){var protect=this.protectedElements;content=content.replace(protectRegex,function(a){protect.push(a);return"<!-- mooeditable:protect:"+(protect.length-1)+" -->"});this.doc.body.set("html",this.ensureRootElement(content));return this},saveContent:function(){if(this.mode=="iframe"){this.textarea.set("value",this.getContent())}return this},ensureRootElement:function(val){if(this.options.rootElement){var el=new Element("div",{html:val.trim()});var start=-1;var create=false;var html="";var length=el.childNodes.length;for(var i=0;i<length;i++){var childNode=el.childNodes[i];var nodeName=childNode.nodeName;if(!nodeName.test(blockEls)&&nodeName!=="#comment"){if(nodeName==="#text"){if(childNode.nodeValue.trim()){if(start<0){start=i}html+=childNode.nodeValue}}else{if(start<0){start=i}html+=new Element("div").adopt($(childNode).clone()).get("html")}}else{create=true}if(i==(length-1)){create=true}if(start>=0&&create){var newel=new Element(this.options.rootElement,{html:html});el.replaceChild(newel,el.childNodes[start]);for(var k=start+1;k<i;k++){el.removeChild(el.childNodes[k]);length--;i--;k--}start=-1;create=false;html=""}}val=el.get("html").replace(/\n\n/g,"")}return val},checkStates:function(){var element=this.selection.getNode();if(!element){return}if(typeOf(element)!="element"){return}this.actions.each(function(action){var item=this.toolbar.getItem(action);if(!item){return}item.deactivate();var states=MooEditable.Actions[action]["states"];if(!states){return}if(typeOf(states)=="function"){states.attempt([document.id(element),item],this);return}try{if(this.doc.queryCommandState(action)){item.activate();return}}catch(e){}if(states.tags){var el=element;do{var tag=el.tagName.toLowerCase();if(states.tags.contains(tag)){item.activate(tag);break}}while((el=Element.getParent(el))!=null)}if(states.css){var el=element;do{var found=false;for(var prop in states.css){var css=states.css[prop];if(el.style[prop.camelCase()].contains(css)){item.activate(css);found=true}}if(found||el.tagName.test(blockEls)){break}}while((el=Element.getParent(el))!=null)}}.bind(this))},cleanup:function(source){if(!this.options.cleanup){return source.trim()}do{var oSource=source;if(this.options.baseURL){source=source.replace('="'+this.options.baseURL,'="')}source=source.replace(/<br class\="webkit-block-placeholder">/gi,"<br />");source=source.replace(/<span class="Apple-style-span">(.*)<\/span>/gi,"$1");source=source.replace(/ class="Apple-style-span"/gi,"");source=source.replace(/<span style="">/gi,"");source=source.replace(/<p>\s*<br ?\/?>\s*<\/p>/gi,"<p>\u00a0</p>");source=source.replace(/<p>( |\s)*<\/p>/gi,"<p>\u00a0</p>");if(!this.options.semantics){source=source.replace(/\s*<br ?\/?>\s*<\/p>/gi,"</p>")}if(this.options.xhtml){source=source.replace(/<br>/gi,"<br />")}if(this.options.semantics){if(Browser.ie){source=source.replace(/<li>\s*<div>(.+?)<\/div><\/li>/g,"<li>$1</li>")}if(Browser.safari||Browser.chrome){source=source.replace(/^([\w\s]+.*?)<div>/i,"<p>$1</p><div>");source=source.replace(/<div>(.+?)<\/div>/ig,"<p>$1</p>")}if(!Browser.ie){source=source.replace(/<p>[\s\n]*(<(?:ul|ol)>.*?<\/(?:ul|ol)>)(.*?)<\/p>/ig,"$1<p>$2</p>");source=source.replace(/<\/(ol|ul)>\s*(?!<(?:p|ol|ul|img).*?>)((?:<[^>]*>)?\w.*)$/g,"</$1><p>$2</p>")}source=source.replace(/<br[^>]*><\/p>/g,"</p>");source=source.replace(/<p>\s*(<img[^>]+>)\s*<\/p>/ig,"$1\n");source=source.replace(/<p([^>]*)>(.*?)<\/p>(?!\n)/g,"<p$1>$2</p>\n");source=source.replace(/<\/(ul|ol|p)>(?!\n)/g,"</$1>\n");source=source.replace(/><li>/g,">\n\t<li>");source=source.replace(/([^\n])<\/(ol|ul)>/g,"$1\n</$2>");source=source.replace(/([^\n])<img/ig,"$1\n<img");source=source.replace(/^\s*$/g,"")}source=source.replace(/<br ?\/?>$/gi,"");source=source.replace(/^<br ?\/?>/gi,"");if(this.options.paragraphise){source=source.replace(/(h[1-6]|p|div|address|pre|li|ol|ul|blockquote|center|dl|dt|dd)><br ?\/?>/gi,"$1>")}source=source.replace(/<br ?\/?>\s*<\/(h1|h2|h3|h4|h5|h6|li|p)/gi,"</$1");source=source.replace(/<span style="font-weight: bold;">(.*)<\/span>/gi,"<strong>$1</strong>");source=source.replace(/<span style="font-style: italic;">(.*)<\/span>/gi,"<em>$1</em>");source=source.replace(/<b\b[^>]*>(.*?)<\/b[^>]*>/gi,"<strong>$1</strong>");source=source.replace(/<i\b[^>]*>(.*?)<\/i[^>]*>/gi,"<em>$1</em>");source=source.replace(/<u\b[^>]*>(.*?)<\/u[^>]*>/gi,'<span style="text-decoration: underline;">$1</span>');source=source.replace(/<strong><span style="font-weight: normal;">(.*)<\/span><\/strong>/gi,"$1");source=source.replace(/<em><span style="font-weight: normal;">(.*)<\/span><\/em>/gi,"$1");source=source.replace(/<span style="text-decoration: underline;"><span style="font-weight: normal;">(.*)<\/span><\/span>/gi,"$1");source=source.replace(/<strong style="font-weight: normal;">(.*)<\/strong>/gi,"$1");source=source.replace(/<em style="font-weight: normal;">(.*)<\/em>/gi,"$1");source=source.replace(/<[^> ]*/g,function(match){return match.toLowerCase()});source=source.replace(/<[^>]*>/g,function(match){match=match.replace(/ [^=]+=/g,function(match2){return match2.toLowerCase()});return match});source=source.replace(/<[^!][^>]*>/g,function(match){match=match.replace(/( [^=]+=)([^"][^ >]*)/g,'$1"$2"');return match});if(this.options.xhtml){source=source.replace(/<img([^>]+)(\s*[^\/])>(<\/img>)*/gi,"<img$1$2 />")}source=source.replace(/<p>(?:\s*)<p>/g,"<p>");source=source.replace(/<\/p>\s*<\/p>/g,"</p>");source=source.replace(/<pre[^>]*>.*?<\/pre>/gi,function(match){return match.replace(/<br ?\/?>/gi,"\n")});source=source.trim()}while(source!=oSource);return source}});MooEditable.Selection=new Class({initialize:function(win){this.win=win},getSelection:function(){this.win.focus();return(this.win.getSelection)?this.win.getSelection():this.win.document.selection},getRange:function(){var s=this.getSelection();if(!s){return null}try{return s.rangeCount>0?s.getRangeAt(0):(s.createRange?s.createRange():null)}catch(e){return this.doc.body.createTextRange()}},setRange:function(range){if(range.select){Function.attempt(function(){range.select()})}else{var s=this.getSelection();if(s.addRange){s.removeAllRanges();s.addRange(range)}}},selectNode:function(node,collapse){var r=this.getRange();var s=this.getSelection();if(r.moveToElementText){Function.attempt(function(){r.moveToElementText(node);r.select()})}else{if(s.addRange){collapse?r.selectNodeContents(node):r.selectNode(node);s.removeAllRanges();s.addRange(r)}else{s.setBaseAndExtent(node,0,node,1)}}return node},isCollapsed:function(){var r=this.getRange();if(r.item){return false}return r.boundingWidth==0||this.getSelection().isCollapsed},collapse:function(toStart){var r=this.getRange();var s=this.getSelection();if(r.select){r.collapse(toStart);r.select()}else{toStart?s.collapseToStart():s.collapseToEnd()}},getContent:function(){var r=this.getRange();var body=new Element("body");if(this.isCollapsed()){return""}if(r.cloneContents){body.appendChild(r.cloneContents())}else{if(r.item!=undefined||r.htmlText!=undefined){body.set("html",r.item?r.item(0).outerHTML:r.htmlText)}else{body.set("html",r.toString())}}var content=body.get("html");return content},getText:function(){var r=this.getRange();var s=this.getSelection();return this.isCollapsed()?"":r.text||(s.toString?s.toString():"")},getNode:function(){var r=this.getRange();if(!Browser.ie||Browser.version>=9){var el=null;if(r){el=r.commonAncestorContainer;if(!r.collapsed){if(r.startContainer==r.endContainer){if(r.startOffset-r.endOffset<2){if(r.startContainer.hasChildNodes()){el=r.startContainer.childNodes[r.startOffset]}}}}while(typeOf(el)!="element"){el=el.parentNode}}return document.id(el)}return document.id(r.item?r.item(0):r.parentElement())},insertContent:function(content){if(Browser.ie){var r=this.getRange();if(r.pasteHTML){r.pasteHTML(content);r.collapse(false);r.select()}else{if(r.insertNode){r.deleteContents();if(r.createContextualFragment){r.insertNode(r.createContextualFragment(content))}else{var doc=this.win.document;var fragment=doc.createDocumentFragment();var temp=doc.createElement("div");fragment.appendChild(temp);temp.outerHTML=content;r.insertNode(fragment)}}}}else{this.win.document.execCommand("insertHTML",false,content)}}});var phrases={};MooEditable.Locale={define:function(key,value){if(typeOf(window.Locale)!="null"){return Locale.define("en-US","MooEditable",key,value)}if(typeOf(key)=="object"){Object.merge(phrases,key)}else{phrases[key]=value}},get:function(key){if(typeOf(window.Locale)!="null"){return Locale.get("MooEditable."+key)}return key?phrases[key]:""}};MooEditable.Locale.define({ok:"OK",cancel:"Cancel",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",unorderedList:"Unordered List",orderedList:"Ordered List",indent:"Indent",outdent:"Outdent",undo:"Undo",redo:"Redo",removeHyperlink:"Remove Hyperlink",addHyperlink:"Add Hyperlink",selectTextHyperlink:"Please select the text you wish to hyperlink.",enterURL:"Enter URL",enterImageURL:"Enter image URL",addImage:"Add Image",toggleView:"Toggle View"});MooEditable.UI={};MooEditable.UI.Toolbar=new Class({Implements:[Events,Options],options:{"class":""},initialize:function(options){this.setOptions(options);this.el=new Element("div",{"class":"mooeditable-ui-toolbar "+this.options["class"]});this.items={};this.content=null},toElement:function(){return this.el},render:function(actions){if(this.content){this.el.adopt(this.content)}else{this.content=actions.map(function(action){return(action=="|")?this.addSeparator():this.addItem(action)}.bind(this))}return this},addItem:function(action){var self=this;var act=MooEditable.Actions[action];if(!act){return}var type=act.type||"button";var options=act.options||{};var item=new MooEditable.UI[type.camelCase().capitalize()](Object.append(options,{name:action,"class":action+"-item toolbar-item",title:act.title,onAction:self.itemAction.bind(self)}));this.items[action]=item;document.id(item).inject(this.el);return item},getItem:function(action){return this.items[action]},addSeparator:function(){return new Element("span",{"class":"toolbar-separator"}).inject(this.el)},itemAction:function(){this.fireEvent("itemAction",arguments)},disable:function(except){Object.each(this.items,function(item){(item.name==except)?item.activate():item.deactivate().disable()});return this},enable:function(){Object.each(this.items,function(item){item.enable()});return this},show:function(){this.el.setStyle("display","");return this},hide:function(){this.el.setStyle("display","none");return this}});MooEditable.UI.Button=new Class({Implements:[Events,Options],options:{title:"",name:"",text:"Button","class":"",shortcut:"",mode:"icon"},initialize:function(options){this.setOptions(options);this.name=this.options.name;this.render()},toElement:function(){return this.el},render:function(){var self=this;var key=(Browser.Platform.mac)?"Cmd":"Ctrl";var shortcut=(this.options.shortcut)?" ( "+key+"+"+this.options.shortcut.toUpperCase()+" )":"";var text=this.options.title||name;var title=text+shortcut;this.el=new Element("button",{"class":"mooeditable-ui-button "+self.options["class"],title:title,html:'<span class="button-icon"></span><span class="button-text">'+text+"</span>",events:{click:self.click.bind(self),mousedown:function(e){e.preventDefault()}}});if(this.options.mode!="icon"){this.el.addClass("mooeditable-ui-button-"+this.options.mode)}this.active=false;this.disabled=false;if(Browser.ie){this.el.addEvents({mouseenter:function(e){this.addClass("hover")},mouseleave:function(e){this.removeClass("hover")}})}return this},click:function(e){e.preventDefault();if(this.disabled){return}this.action(e)},action:function(){this.fireEvent("action",[this].concat(Array.from(arguments)))},enable:function(){if(this.active){this.el.removeClass("onActive")}if(!this.disabled){return}this.disabled=false;this.el.removeClass("disabled").set({disabled:false,opacity:1});return this},disable:function(){if(this.disabled){return}this.disabled=true;this.el.addClass("disabled").set({disabled:true,opacity:0.4});return this},activate:function(){if(this.disabled){return}this.active=true;this.el.addClass("onActive");return this},deactivate:function(){this.active=false;this.el.removeClass("onActive");return this}});MooEditable.UI.Dialog=new Class({Implements:[Events,Options],options:{"class":"",contentClass:""},initialize:function(html,options){this.setOptions(options);this.html=html;var self=this;this.el=new Element("div",{"class":"mooeditable-ui-dialog "+self.options["class"],html:'<div class="dialog-content '+self.options.contentClass+'">'+html+"</div>",styles:{display:"none"},events:{click:self.click.bind(self)}})},toElement:function(){return this.el},click:function(){this.fireEvent("click",arguments);return this},open:function(){this.el.setStyle("display","");this.fireEvent("open",this);return this},close:function(){this.el.setStyle("display","none");this.fireEvent("close",this);return this}});MooEditable.UI.AlertDialog=function(alertText){if(!alertText){return}var html=alertText+' <button class="dialog-ok-button">'+MooEditable.Locale.get("ok")+"</button>";return new MooEditable.UI.Dialog(html,{"class":"mooeditable-alert-dialog",onOpen:function(){var button=this.el.getElement(".dialog-ok-button");(function(){button.focus()}).delay(10)},onClick:function(e){e.preventDefault();if(e.target.tagName.toLowerCase()!="button"){return}if(document.id(e.target).hasClass("dialog-ok-button")){this.close()}}})};MooEditable.UI.PromptDialog=function(questionText,answerText,fn){if(!questionText){return}var html='<label class="dialog-label">'+questionText+' <input type="text" class="text dialog-input" value="'+answerText+'"></label> <button class="dialog-button dialog-ok-button">'+MooEditable.Locale.get("ok")+'</button><button class="dialog-button dialog-cancel-button">'+MooEditable.Locale.get("cancel")+"</button>";return new MooEditable.UI.Dialog(html,{"class":"mooeditable-prompt-dialog",onOpen:function(){var input=this.el.getElement(".dialog-input");(function(){input.focus();input.select()}).delay(10)},onClick:function(e){e.preventDefault();if(e.target.tagName.toLowerCase()!="button"){return}var button=document.id(e.target);var input=this.el.getElement(".dialog-input");if(button.hasClass("dialog-cancel-button")){input.set("value",answerText);this.close()}else{if(button.hasClass("dialog-ok-button")){var answer=input.get("value");input.set("value",answerText);this.close();if(fn){fn.attempt(answer,this)}}}}})};MooEditable.Actions={bold:{title:MooEditable.Locale.get("bold"),options:{shortcut:"b"},states:{tags:["b","strong"],css:{"font-weight":"bold"}},events:{beforeToggleView:function(){if(Browser.firefox){var value=this.textarea.get("value");var newValue=value.replace(/<strong([^>]*)>/gi,"<b$1>").replace(/<\/strong>/gi,"</b>");if(value!=newValue){this.textarea.set("value",newValue)}}},attach:function(){if(Browser.firefox){var value=this.textarea.get("value");var newValue=value.replace(/<strong([^>]*)>/gi,"<b$1>").replace(/<\/strong>/gi,"</b>");if(value!=newValue){this.textarea.set("value",newValue);this.setContent(newValue)}}}}},italic:{title:MooEditable.Locale.get("italic"),options:{shortcut:"i"},states:{tags:["i","em"],css:{"font-style":"italic"}},events:{beforeToggleView:function(){if(Browser.firefox){var value=this.textarea.get("value");var newValue=value.replace(/<embed([^>]*)>/gi,"<tmpembed$1>").replace(/<em([^>]*)>/gi,"<i$1>").replace(/<tmpembed([^>]*)>/gi,"<embed$1>").replace(/<\/em>/gi,"</i>");if(value!=newValue){this.textarea.set("value",newValue)}}},attach:function(){if(Browser.firefox){var value=this.textarea.get("value");var newValue=value.replace(/<embed([^>]*)>/gi,"<tmpembed$1>").replace(/<em([^>]*)>/gi,"<i$1>").replace(/<tmpembed([^>]*)>/gi,"<embed$1>").replace(/<\/em>/gi,"</i>");if(value!=newValue){this.textarea.set("value",newValue);this.setContent(newValue)}}}}},underline:{title:MooEditable.Locale.get("underline"),options:{shortcut:"u"},states:{tags:["u"],css:{"text-decoration":"underline"}}},strikethrough:{title:MooEditable.Locale.get("strikethrough"),options:{shortcut:"s"},states:{tags:["s","strike"],css:{"text-decoration":"line-through"}}},insertunorderedlist:{title:MooEditable.Locale.get("unorderedList"),states:{tags:["ul"]}},insertorderedlist:{title:MooEditable.Locale.get("orderedList"),states:{tags:["ol"]}},indent:{title:MooEditable.Locale.get("indent"),states:{tags:["blockquote"]}},outdent:{title:MooEditable.Locale.get("outdent")},undo:{title:MooEditable.Locale.get("undo"),options:{shortcut:"z"}},redo:{title:MooEditable.Locale.get("redo"),options:{shortcut:"y"}},unlink:{title:MooEditable.Locale.get("removeHyperlink")},createlink:{title:MooEditable.Locale.get("addHyperlink"),options:{shortcut:"l"},states:{tags:["a"]},dialogs:{alert:MooEditable.UI.AlertDialog.pass(MooEditable.Locale.get("selectTextHyperlink")),prompt:function(editor){return MooEditable.UI.PromptDialog(MooEditable.Locale.get("enterURL"),"http://",function(url){editor.execute("createlink",false,url.trim())})}},command:function(){var selection=this.selection;var dialogs=this.dialogs.createlink;if(selection.isCollapsed()){var node=selection.getNode();if(node.get("tag")=="a"&&node.get("href")){selection.selectNode(node);var prompt=dialogs.prompt;prompt.el.getElement(".dialog-input").set("value",node.get("href"));prompt.open()}else{dialogs.alert.open()}}else{var text=selection.getText();var prompt=dialogs.prompt;if(urlRegex.test(text)){prompt.el.getElement(".dialog-input").set("value",text)}prompt.open()}}},urlimage:{title:MooEditable.Locale.get("addImage"),options:{shortcut:"m"},dialogs:{prompt:function(editor){return MooEditable.UI.PromptDialog(MooEditable.Locale.get("enterImageURL"),"http://",function(url){editor.execute("insertimage",false,url.trim())})}},command:function(){this.dialogs.urlimage.prompt.open()}},toggleview:{title:MooEditable.Locale.get("toggleView"),command:function(){(this.mode=="textarea")?this.toolbar.enable():this.toolbar.disable("toggleview");this.toggleView()}}};MooEditable.Actions.Settings={};Element.Properties.mooeditable={get:function(){return this.retrieve("MooEditable")}};Element.implement({mooEditable:function(options){var mooeditable=this.get("mooeditable");if(!mooeditable){mooeditable=new MooEditable(this,options)}return mooeditable}})})();var DatePicker=new Class({Implements:Options,d:"",today:"",choice:{},bodysize:{},limit:{},attachTo:null,picker:null,slider:null,oldContents:null,newContents:null,input:null,visual:null,options:{pickerClass:"datepicker",days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayShort:2,monthShort:3,startDay:1,timePicker:false,timePickerOnly:false,yearPicker:true,yearsPerPage:20,format:"d-m-Y",allowEmpty:false,inputOutputFormat:"U",animationDuration:400,useFadeInOut:!Browser.Engine.trident,startView:"month",positionOffset:{x:0,y:0},minDate:null,maxDate:null,debug:false,toggleElements:null,onShow:$empty,onClose:$empty,onSelect:$empty},initialize:function(attachTo,options){this.attachTo=attachTo;this.setOptions(options).attach();if(this.options.timePickerOnly){this.options.timePicker=true;this.options.startView="time"}this.formatMinMaxDates();document.addEvent("mousedown",this.close.bind(this))},formatMinMaxDates:function(){if(this.options.minDate&&this.options.minDate.format){this.options.minDate=this.unformat(this.options.minDate.date,this.options.minDate.format)}if(this.options.maxDate&&this.options.maxDate.format){this.options.maxDate=this.unformat(this.options.maxDate.date,this.options.maxDate.format);this.options.maxDate.setHours(23);this.options.maxDate.setMinutes(59);this.options.maxDate.setSeconds(59)}},attach:function(){if($chk(this.options.toggleElements)){var togglers=$$(this.options.toggleElements);document.addEvents({keydown:function(e){if(e.key=="tab"){this.close(null,true)}}.bind(this)})}$$(this.attachTo).each(function(item,index){if(item.retrieve("datepicker")){return}if($chk(item.get("value"))){var init_clone_val=this.format(new Date(this.unformat(item.get("value"),this.options.inputOutputFormat)),this.options.format)}else{if(!this.options.allowEmpty){var init_clone_val=this.format(new Date(),this.options.format)}else{var init_clone_val=""}}var display=item.getStyle("display");var clone=item.setStyle("display",this.options.debug?display:"none").store("datepicker",true).clone().store("datepicker",true).removeProperty("name").setStyle("display",display).set("value",init_clone_val).inject(item,"after");if($chk(this.options.toggleElements)){togglers[index].setStyle("cursor","pointer").addEvents({click:function(e){this.onFocus(item,clone)}.bind(this)});clone.addEvents({blur:function(){item.set("value",clone.get("value"))}})}else{clone.addEvents({keydown:function(e){if(this.options.allowEmpty&&(e.key=="delete"||e.key=="backspace")){item.set("value","");e.target.set("value","");this.close(null,true)}else{if(e.key=="tab"){this.close(null,true)}else{e.stop()}}}.bind(this),focus:function(e){this.onFocus(item,clone)}.bind(this)})}}.bind(this))},onFocus:function(original_input,visual_input){var init_visual_date,d=visual_input.getCoordinates();if($chk(original_input.get("value"))){init_visual_date=this.unformat(original_input.get("value"),this.options.inputOutputFormat).valueOf()}else{init_visual_date=new Date();if($chk(this.options.maxDate)&&init_visual_date.valueOf()>this.options.maxDate.valueOf()){init_visual_date=new Date(this.options.maxDate.valueOf())}if($chk(this.options.minDate)&&init_visual_date.valueOf()<this.options.minDate.valueOf()){init_visual_date=new Date(this.options.minDate.valueOf())}}this.show({left:d.left+this.options.positionOffset.x,top:d.top+d.height+this.options.positionOffset.y},init_visual_date);this.input=original_input;this.visual=visual_input;this.options.onShow()},dateToObject:function(d){return{year:d.getFullYear(),month:d.getMonth(),day:d.getDate(),hours:d.getHours(),minutes:d.getMinutes(),seconds:d.getSeconds()}},dateFromObject:function(values){var d=new Date();d.setDate(1);["year","month","day","hours","minutes","seconds"].each(function(type){var v=values[type];if(!$chk(v)){return}switch(type){case"day":d.setDate(v);break;case"month":d.setMonth(v);break;case"year":d.setFullYear(v);break;case"hours":d.setHours(v);break;case"minutes":d.setMinutes(v);break;case"seconds":d.setSeconds(v);break}});return d},show:function(position,timestamp){this.formatMinMaxDates();if($chk(timestamp)){this.d=new Date(timestamp)}else{this.d=new Date()}this.today=new Date();this.choice=this.dateToObject(this.d);this.mode=(this.options.startView=="time"&&!this.options.timePicker)?"month":this.options.startView;this.render();this.picker.setStyles(position)},render:function(fx){if(!$chk(this.picker)){this.constructPicker()}else{var o=this.oldContents;this.oldContents=this.newContents;this.newContents=o;this.newContents.empty()}var startDate=new Date(this.d.getTime());this.limit={right:false,left:false};if(this.mode=="decades"){this.renderDecades()}else{if(this.mode=="year"){this.renderYear()}else{if(this.mode=="time"){this.renderTime();this.limit={right:true,left:true}}else{this.renderMonth()}}}this.picker.getElement(".previous").setStyle("visibility",this.limit.left?"hidden":"visible");this.picker.getElement(".next").setStyle("visibility",this.limit.right?"hidden":"visible");this.picker.getElement(".titleText").setStyle("cursor",this.allowZoomOut()?"pointer":"default");this.d=startDate;if(this.picker.getStyle("opacity")==0){this.picker.tween("opacity",0,1)}if($chk(fx)){this.fx(fx)}},fx:function(fx){if(fx=="right"){this.oldContents.setStyles({left:0,opacity:1});this.newContents.setStyles({left:this.bodysize.x,opacity:1});this.slider.setStyle("left",0).tween("left",0,-this.bodysize.x)}else{if(fx=="left"){this.oldContents.setStyles({left:this.bodysize.x,opacity:1});this.newContents.setStyles({left:0,opacity:1});this.slider.setStyle("left",-this.bodysize.x).tween("left",-this.bodysize.x,0)}else{if(fx=="fade"){this.slider.setStyle("left",0);this.oldContents.setStyle("left",0).set("tween",{duration:this.options.animationDuration/2}).tween("opacity",1,0);this.newContents.setStyles({opacity:0,left:0}).set("tween",{duration:this.options.animationDuration}).tween("opacity",0,1)}}}},constructPicker:function(){this.picker=new Element("div",{"class":this.options.pickerClass}).inject(document.body);if(this.options.useFadeInOut){this.picker.setStyle("opacity",0).set("tween",{duration:this.options.animationDuration})}var h=new Element("div",{"class":"header"}).inject(this.picker);var titlecontainer=new Element("div",{"class":"title"}).inject(h);new Element("div",{"class":"previous"}).addEvent("click",this.previous.bind(this)).set("text","«").inject(h);new Element("div",{"class":"next"}).addEvent("click",this.next.bind(this)).set("text","»").inject(h);new Element("div",{"class":"closeButton"}).addEvent("click",this.close.bindWithEvent(this,true)).set("text","x").inject(h);new Element("span",{"class":"titleText"}).addEvent("click",this.zoomOut.bind(this)).inject(titlecontainer);var b=new Element("div",{"class":"body"}).inject(this.picker);this.bodysize=b.getSize();this.slider=new Element("div",{styles:{position:"absolute",top:0,left:0,width:2*this.bodysize.x,height:this.bodysize.y}}).set("tween",{duration:this.options.animationDuration,transition:Fx.Transitions.Quad.easeInOut}).inject(b);this.oldContents=new Element("div",{styles:{position:"absolute",top:0,left:this.bodysize.x,width:this.bodysize.x,height:this.bodysize.y}}).inject(this.slider);this.newContents=new Element("div",{styles:{position:"absolute",top:0,left:0,width:this.bodysize.x,height:this.bodysize.y}}).inject(this.slider)},renderTime:function(){var container=new Element("div",{"class":"time"}).inject(this.newContents);if(this.options.timePickerOnly){this.picker.getElement(".titleText").set("text","Select a time")}else{this.picker.getElement(".titleText").set("text",this.format(this.d,"j M, Y"))}new Element("input",{type:"text","class":"hour"}).set("value",this.leadZero(this.d.getHours())).addEvents({mousewheel:function(e){var i=e.target,v=i.get("value").toInt();i.focus();if(e.wheel>0){v=(v<23)?v+1:0}else{v=(v>0)?v-1:23}i.set("value",this.leadZero(v));e.stop()}.bind(this)}).set("maxlength",2).inject(container);new Element("input",{type:"text","class":"minutes"}).set("value",this.leadZero(this.d.getMinutes())).addEvents({mousewheel:function(e){var i=e.target,v=i.get("value").toInt();i.focus();if(e.wheel>0){v=(v<59)?v+1:0}else{v=(v>0)?v-1:59}i.set("value",this.leadZero(v));e.stop()}.bind(this)}).set("maxlength",2).inject(container);new Element("div",{"class":"separator"}).set("text",":").inject(container);new Element("input",{type:"submit",value:"OK","class":"ok"}).addEvents({click:function(e){e.stop();this.select($merge(this.dateToObject(this.d),{hours:this.picker.getElement(".hour").get("value").toInt(),minutes:this.picker.getElement(".minutes").get("value").toInt()}))}.bind(this)}).set("maxlength",2).inject(container)},renderMonth:function(){var month=this.d.getMonth();this.picker.getElement(".titleText").set("text",this.options.months[month]+" "+this.d.getFullYear());this.d.setDate(1);while(this.d.getDay()!=this.options.startDay){this.d.setDate(this.d.getDate()-1)}var container=new Element("div",{"class":"days"}).inject(this.newContents);var titles=new Element("div",{"class":"titles"}).inject(container);var d,i,classes,e,weekcontainer;for(d=this.options.startDay;d<(this.options.startDay+7);d++){new Element("div",{"class":"title day day"+(d%7)}).set("text",this.options.days[(d%7)].substring(0,this.options.dayShort)).inject(titles)}var available=false;var t=this.today.toDateString();var currentChoice=this.dateFromObject(this.choice).toDateString();for(i=0;i<42;i++){classes=[];classes.push("day");classes.push("day"+this.d.getDay());if(this.d.toDateString()==t){classes.push("today")}if(this.d.toDateString()==currentChoice){classes.push("selected")}if(this.d.getMonth()!=month){classes.push("otherMonth")}if(i%7==0){weekcontainer=new Element("div",{"class":"week week"+(Math.floor(i/7))}).inject(container)}e=new Element("div",{"class":classes.join(" ")}).set("text",this.d.getDate()).inject(weekcontainer);if(this.limited("date")){e.addClass("unavailable");if(available){this.limit.right=true}else{if(this.d.getMonth()==month){this.limit.left=true}}}else{available=true;e.addEvent("click",function(e,d){if(this.options.timePicker){this.d.setDate(d.day);this.d.setMonth(d.month);this.mode="time";this.render("fade")}else{this.select(d)}}.bindWithEvent(this,{day:this.d.getDate(),month:this.d.getMonth(),year:this.d.getFullYear()}))}this.d.setDate(this.d.getDate()+1)}if(!available){this.limit.right=true}},renderYear:function(){var month=this.today.getMonth();var thisyear=this.d.getFullYear()==this.today.getFullYear();var selectedyear=this.d.getFullYear()==this.choice.year;this.picker.getElement(".titleText").set("text",this.d.getFullYear());this.d.setMonth(0);var i,e;var available=false;var container=new Element("div",{"class":"months"}).inject(this.newContents);for(i=0;i<=11;i++){e=new Element("div",{"class":"month month"+(i+1)+(i==month&&thisyear?" today":"")+(i==this.choice.month&&selectedyear?" selected":"")}).set("text",this.options.monthShort?this.options.months[i].substring(0,this.options.monthShort):this.options.months[i]).inject(container);if(this.limited("month")){e.addClass("unavailable");if(available){this.limit.right=true}else{this.limit.left=true}}else{available=true;e.addEvent("click",function(e,d){this.d.setDate(1);this.d.setMonth(d);this.mode="month";this.render("fade")}.bindWithEvent(this,i))}this.d.setMonth(i)}if(!available){this.limit.right=true}},renderDecades:function(){while(this.d.getFullYear()%this.options.yearsPerPage>0){this.d.setFullYear(this.d.getFullYear()-1)}this.picker.getElement(".titleText").set("text",this.d.getFullYear()+"-"+(this.d.getFullYear()+this.options.yearsPerPage-1));var i,y,e;var available=false;var container=new Element("div",{"class":"years"}).inject(this.newContents);if($chk(this.options.minDate)&&this.d.getFullYear()<=this.options.minDate.getFullYear()){this.limit.left=true}for(i=0;i<this.options.yearsPerPage;i++){y=this.d.getFullYear();e=new Element("div",{"class":"year year"+i+(y==this.today.getFullYear()?" today":"")+(y==this.choice.year?" selected":"")}).set("text",y).inject(container);if(this.limited("year")){e.addClass("unavailable");if(available){this.limit.right=true}else{this.limit.left=true}}else{available=true;e.addEvent("click",function(e,d){this.d.setFullYear(d);this.mode="year";this.render("fade")}.bindWithEvent(this,y))}this.d.setFullYear(this.d.getFullYear()+1)}if(!available){this.limit.right=true}if($chk(this.options.maxDate)&&this.d.getFullYear()>=this.options.maxDate.getFullYear()){this.limit.right=true}},limited:function(type){var cs=$chk(this.options.minDate);var ce=$chk(this.options.maxDate);if(!cs&&!ce){return false}switch(type){case"year":return(cs&&this.d.getFullYear()<this.options.minDate.getFullYear())||(ce&&this.d.getFullYear()>this.options.maxDate.getFullYear());case"month":var ms=(""+this.d.getFullYear()+this.leadZero(this.d.getMonth())).toInt();return cs&&ms<(""+this.options.minDate.getFullYear()+this.leadZero(this.options.minDate.getMonth())).toInt()||ce&&ms>(""+this.options.maxDate.getFullYear()+this.leadZero(this.options.maxDate.getMonth())).toInt();case"date":return(cs&&this.d<this.options.minDate)||(ce&&this.d>this.options.maxDate)}},allowZoomOut:function(){if(this.mode=="time"&&this.options.timePickerOnly){return false}if(this.mode=="decades"){return false}if(this.mode=="year"&&!this.options.yearPicker){return false}return true},zoomOut:function(){if(!this.allowZoomOut()){return}if(this.mode=="year"){this.mode="decades"}else{if(this.mode=="time"){this.mode="month"}else{this.mode="year"}}this.render("fade")},previous:function(){if(this.mode=="decades"){this.d.setFullYear(this.d.getFullYear()-this.options.yearsPerPage)}else{if(this.mode=="year"){this.d.setFullYear(this.d.getFullYear()-1)}else{if(this.mode=="month"){this.d.setMonth(this.d.getMonth()-1)}}}this.render("left")},next:function(){if(this.mode=="decades"){this.d.setFullYear(this.d.getFullYear()+this.options.yearsPerPage)}else{if(this.mode=="year"){this.d.setFullYear(this.d.getFullYear()+1)}else{if(this.mode=="month"){this.d.setMonth(this.d.getMonth()+1)}}}this.render("right")},close:function(e,force){if(!$(this.picker)){return}var clickOutside=($chk(e)&&e.target!=this.picker&&!this.picker.hasChild(e.target)&&e.target!=this.visual);if(force||clickOutside){if(this.options.useFadeInOut){this.picker.set("tween",{duration:this.options.animationDuration/2,onComplete:this.destroy.bind(this)}).tween("opacity",1,0)}else{this.destroy()}}},destroy:function(){this.picker.destroy();this.picker=null;this.options.onClose()},select:function(values){this.choice=$merge(this.choice,values);var d=this.dateFromObject(this.choice);this.input.set("value",this.format(d,this.options.inputOutputFormat));this.visual.set("value",this.format(d,this.options.format));this.options.onSelect(d);this.close(null,true)},leadZero:function(v){return v<10?"0"+v:v},format:function(t,format){var f="";var h=t.getHours();var m=t.getMonth();for(var i=0;i<format.length;i++){switch(format.charAt(i)){case"\\":i++;f+=format.charAt(i);break;case"y":f+=(100+t.getYear()+"").substring(1);break;case"Y":f+=t.getFullYear();break;case"m":f+=this.leadZero(m+1);break;case"n":f+=(m+1);break;case"M":f+=this.options.months[m].substring(0,this.options.monthShort);break;case"F":f+=this.options.months[m];break;case"d":f+=this.leadZero(t.getDate());break;case"j":f+=t.getDate();break;case"D":f+=this.options.days[t.getDay()].substring(0,this.options.dayShort);break;case"l":f+=this.options.days[t.getDay()];break;case"G":f+=h;break;case"H":f+=this.leadZero(h);break;case"g":f+=(h%12?h%12:12);break;case"h":f+=this.leadZero(h%12?h%12:12);break;case"a":f+=(h>11?"pm":"am");break;case"A":f+=(h>11?"PM":"AM");break;case"i":f+=this.leadZero(t.getMinutes());break;case"s":f+=this.leadZero(t.getSeconds());break;case"U":f+=Math.floor(t.valueOf()/1000);break;default:f+=format.charAt(i)}}return f},unformat:function(t,format){var d=new Date();var a={};var c,m;t=t.toString();for(var i=0;i<format.length;i++){c=format.charAt(i);switch(c){case"\\":r=null;i++;break;case"y":r="[0-9]{2}";break;case"Y":r="[0-9]{4}";break;case"m":r="0[1-9]|1[012]";break;case"n":r="[1-9]|1[012]";break;case"M":r="[A-Za-z]{"+this.options.monthShort+"}";break;case"F":r="[A-Za-z]+";break;case"d":r="0[1-9]|[12][0-9]|3[01]";break;case"j":r="[1-9]|[12][0-9]|3[01]";break;case"D":r="[A-Za-z]{"+this.options.dayShort+"}";break;case"l":r="[A-Za-z]+";break;case"G":case"H":case"g":case"h":r="[0-9]{1,2}";break;case"a":r="(am|pm)";break;case"A":r="(AM|PM)";break;case"i":case"s":r="[012345][0-9]";break;case"U":r="-?[0-9]+$";break;default:r=null}if($chk(r)){m=t.match("^"+r);if($chk(m)){a[c]=m[0];t=t.substring(a[c].length)}else{if(this.options.debug){alert("Fatal Error in DatePicker\n\nUnexpected format at: '"+t+"' expected format character '"+c+"' (pattern '"+r+"')")}return d}}else{t=t.substring(1)}}for(c in a){var v=a[c];switch(c){case"y":d.setFullYear(v<30?2000+v.toInt():1900+v.toInt());break;case"Y":d.setFullYear(v);break;case"m":case"n":d.setMonth(v-1);break;case"M":v=this.options.months.filter(function(item,index){return item.substring(0,this.options.monthShort)==v}.bind(this))[0];case"F":d.setMonth(this.options.months.indexOf(v));break;case"d":case"j":d.setDate(v);break;case"G":case"H":d.setHours(v);break;case"g":case"h":if(a.a=="pm"||a.A=="PM"){d.setHours(v==12?0:v.toInt()+12)}else{d.setHours(v)}break;case"i":d.setMinutes(v);break;case"s":d.setSeconds(v);break;case"U":d=new Date(v.toInt()*1000)}}return d}});var MultipleFields=new Class({version:0.1,options:{spliter:";"},initialize:function(_object,_options){if(!_object){return}if(_object.get("data-spliter")){this.options.spliter=_object.get("data-spliter")}this.inputFields=_object;this.inputFields.each(function(elem){var template=elem.clone().erase("name").erase("id").erase("data-spliter").erase("value").addClass("template");elem.set("type","hidden");new Element("span.add_field",{text:"+"}).inject(elem,"after").addEvent("click",function(e){this.addField(elem,template)}.bind(this));elem.get("value").toString().split(this.options.spliter).each(function(data){this.addField(elem,template,data)}.bind(this))}.bind(this))},addField:function(elem,template,data){template.clone().set("value",data).addEvent("change",function(e){var values=[];e.target.getParent(".input").getElements(".template").each(function(template){if(template.value.trim()){values.push(template.value.trim())}});elem.set("value",values.join(this.options.spliter))}.bind(this)).inject(elem.getParent(".input").getElement(".add_field"),"before")}});window.addEvent("domready",function(){var ajaxNote=new Ajaxify();var lang=document.html.get("lang");if(lang==="en"){lang="en-US"}else{lang=lang+"-"+lang.toUpperCase()}Locale.use(lang);var wysiwyg=[];var setupJsForm=function(scope){scope.getElements(".wysiwyg").each(function(elem){wysiwyg.push(elem.mooEditable())});new MultipleFields(scope.getElements(".multiple_fields"));var dateFormat=Locale.get("Date.shortDate").replace(/%/g,"");var timeFormat="H:i";var dateMonths=Locale.get("Date.months");var dateDays=Locale.get("Date.days");new DatePicker(scope.getElements(".picker.datetime, .picker.timestamp"),{allowEmpty:true,inputOutputFormat:"Y-m-d H:i",months:dateMonths,days:dateDays,timePicker:true,format:dateFormat+" "+timeFormat});new DatePicker(scope.getElements(".picker.date"),{allowEmpty:true,inputOutputFormat:"Y-m-d H:i",months:dateMonths,days:dateDays,format:dateFormat});new DatePicker(scope.getElements(".picker.time"),{allowEmpty:true,inputOutputFormat:"Y-m-d H:i",months:dateMonths,days:dateDays,timePickerOnly:true,format:timeFormat})};var quickEdit=new AjaxEdit({holderParent:$("content"),onStartRequest:function(form){ajaxNote.loading()},onFormInjected:function(form){setupJsForm(form);ajaxNote.success()},onSave:function(form){ajaxNote.success()},onBeforeSubmit:function(){ajaxNote.loading();wysiwyg.each(function(elem){elem.saveContent()})}});var platforms=document.body.getElements(".platform");var main_form=document.id("main_form");if(platforms.length){var setupSortables=function(scope){new Sortables(scope.getElements(".sortable"),{handle:".handle",onStart:function(element,clone){element.addClass("dragged")},onComplete:function(element){element.removeClass("dragged");new Request({method:"get",url:this.element.getParent("tbody").get("data-sort-url")}).send({data:{order:this.serialize()}})}})};var updatePlatform=function(href,platform,callback){ajaxNote.loading();new Request.HTML({method:"get",url:href,onSuccess:function(a,b,html){platform.innerHTML=html;if(callback){callback.call()}setupSortables(platform);ajaxNote.success()}}).send()};platforms.addEvents({"click:relay(.pagination a, thead a)":function(e){e.preventDefault();updatePlatform(this.get("href"),this.getParent(".platform"))},"submit:relay(.search)":function(e){ajaxNote.loading();e.preventDefault();var parent=this.getParent(".platform");new Request.HTML({method:"get",url:this.get("action"),onSuccess:function(a,b,html){parent.innerHTML=html;setupSortables(parent);ajaxNote.success()}}).send({data:this})},"click:relay(.quick_edit)":function(e){e.preventDefault();quickEdit.startEdit(this,this.getParent("tr"))},"click:relay(.action a)":function(e){e.target.addClass("clicked")},"ajax:complete:relay(a[data-method=delete][data-remote])":function(e){e.preventDefault();this.getParent("tr").dispose()}});quickEdit.addEvents({successAndChange:function(json){var tr=this.wrapElement;tr.getElements("td").each(function(td){var name=td.get("data-column-name");if(!name){return}var a=td.getElement("a");(a?a:td).innerHTML=json[name]||""})},successAndNext:function(json){var tr=this.wrapElement;var nextTr=tr.getNext("tr");if(nextTr){quickEdit.startEdit(nextTr.getElement("a"),nextTr)}else{var platform=tr.getParent(".platform");var loadMore=platform.getElement(".load_more");if(loadMore){trIndex=tr.getParent("tbody").getElements("tr").indexOf(tr);updatePlatform(loadMore.get("href"),platform,function(){platform.getElements("tbody tr").each(function(newTr,index){if(trIndex===index){nextTr=newTr.getNext("tr");quickEdit.startEdit(nextTr.getElement("a"),nextTr)}})})}else{nextTr=platform.getElements("tbody tr")[0];quickEdit.startEdit(nextTr.getElement("a"),nextTr)}}}});setupSortables(document.body)}else{if(main_form){setupJsForm(main_form);main_form.addEvents({"click:relay(.quick_edit)":function(e){e.preventDefault();quickEdit.startEdit(this)}});quickEdit.addEvents({successAndChange:function(json){this.wrapElement.set("text",json.to_bhf_s||"")},successAndNext:function(json){var a=this.wrapElement;var li=a.getParent("li");if(!li){this.close();return}var holder=li.getNext("li");if(!holder){holder=li.getParent("ul")}quickEdit.startEdit(holder.getElement("a"))}})}}var dbch=document.body.clientHeight;window.onresize=function(e){dbch=document.body.clientHeight};window.onscroll=function(e){var innerForm=quickEdit.holder.getElement("form");if(!innerForm){return}var scroll=document.body.scrollTop-70;if(scroll<10){scroll=10}if(scroll+innerForm.getSize().y>dbch){return}quickEdit.holder.setStyle("padding-top",scroll)};var fm=$("flash_massages");if(fm){fm.addClass("show").removeClass.delay(4000,fm,"show")}new BrowserUpdate({vs:{i:8,f:3,o:10.01,s:2,n:9}})});
|
599
|
+
(function($){window.rails={applyEvents:function(el){el=$(el||document.body);var apply=function(selector,action,callback){el.getElements(selector).addEvent(action,callback)};apply('form[data-remote="true"]',"submit",rails.handleRemote);apply('a[data-remote="true"], input[data-remote="true"]',"click",rails.handleRemote);apply("a[data-method][data-remote!=true]","click",function(e){e.preventDefault();if(rails.confirmed(this)){var form=new Element("form",{method:"post",action:this.get("href"),styles:{display:"none"}}).inject(this,"after");var methodInput=new Element("input",{type:"hidden",name:"_method",value:this.get("data-method")});var csrfInput=new Element("input",{type:"hidden",name:rails.csrf.param,value:rails.csrf.token});form.adopt(methodInput,csrfInput).submit()}});var noMethodNorRemoteConfirm=":not([data-method]):not([data-remote=true])[data-confirm]";apply("a"+noMethodNorRemoteConfirm+",input"+noMethodNorRemoteConfirm,"click",function(){return rails.confirmed(this)})},getCsrf:function(name){var meta=document.getElement("meta[name=csrf-"+name+"]");return(meta?meta.get("content"):null)},confirmed:function(el){var confirmMessage=el.get("data-confirm");if(confirmMessage&&!confirm(confirmMessage)){return false}return true},disable:function(el){var button=el.get("data-disable-with")?el:el.getElement("[data-disable-with]");if(button){var enableWith=button.get("value");el.addEvent("ajax:complete",function(){button.set({value:enableWith,disabled:false})});button.set({value:button.get("data-disable-with"),disabled:true})}},handleRemote:function(e){e.preventDefault();if(rails.confirmed(this)){this.request=new Request.Rails(this);rails.disable(this);this.request.send()}}};Request.Rails=new Class({Extends:Request,initialize:function(element,options){this.el=element;this.parent(Object.merge({},{method:this.el.get("method")||this.el.get("data-method")||"get",url:this.el.get("action")||this.el.get("href")},options));this.headers.Accept="*/*";this.addRailsEvents()},send:function(options){this.el.fireEvent("ajax:before");if(this.el.get("tag")=="form"){this.options.data=this.el}this.parent(options);this.el.fireEvent("ajax:after",this.xhr)},addRailsEvents:function(){this.addEvent("request",function(){this.el.fireEvent("ajax:loading",this.xhr)});this.addEvent("success",function(){this.el.fireEvent("ajax:success",this.xhr)});this.addEvent("complete",function(){this.el.fireEvent("ajax:complete",this.xhr);this.el.fireEvent("ajax:loaded",this.xhr)});this.addEvent("failure",function(){this.el.fireEvent("ajax:failure",this.xhr)})}})})(document.id);window.addEvent("domready",function(){rails.csrf={token:rails.getCsrf("token"),param:rails.getCsrf("param")};rails.applyEvents()});var BrowserUpdate=new Class({initialize:function(op,test){var b,jsv=5,n=window.navigator;this.op=op||{};this.op.l=op.l||n.language||n.userLanguage||document.documentElement.getAttribute("lang")||"en";this.op.vsakt={i:8,f:3.6,o:10.6,s:5,n:10};this.op.vsdefault={i:6,f:2,o:9.64,s:3,n:10};this.op.vs=op.vs||this.op.vsdefault;for(b in this.op.vsakt){if(this.op.vs[b]>=this.op.vsakt[b]){this.op.vs[b]=this.op.vsdefault[b]}}if(!op.reminder||op.reminder<0.1){this.op.reminder=0}else{this.op.reminder=op.reminder||24}this.op.onshow=op.onshow||function(o){};this.op.url=op.url||"http://browser-update.org/update.html";this.op.pageurl=op.pageurl||window.location.hostname||"unknown";this.op.newwindow=op.newwindow||false;this.op.test=test||op.test||false;if(window.location.hash=="#test-bu"){this.op.test=true}function getBrowser(){var n,v,t,ua=navigator.userAgent,names={i:"Internet Explorer",f:"Firefox",o:"Opera",s:"Apple Safari",n:"Netscape Navigator",c:"Chrome",x:"Other"};if(/like firefox|chromeframe|seamonkey|opera mini|meego|netfront|moblin|maemo|arora|camino|flot|k-meleon|fennec|kazehakase|galeon|android|mobile|iphone|ipod|ipad|symbian|webos/i.test(ua)){n="x"}else{if(/MSIE (\d+\.\d+);/.test(ua)){n="i"}else{if(/Chrome.(\d+\.\d+)/i.test(ua)){n="c"}else{if(/Firefox.(\d+\.\d+)/i.test(ua)){n="f"}else{if(/Version.(\d+.\d+).{0,10}Safari/i.test(ua)){n="s"}else{if(/Safari.(\d+)/i.test(ua)){n="so"}else{if(/Opera.*Version.(\d+\.\d+)/i.test(ua)){n="o"}else{if(/Opera.(\d+\.\d+)/i.test(ua)){n="o"}else{if(/Netscape.(\d+)/i.test(ua)){n="n"}else{return{n:"x",v:0,t:names[n]}}}}}}}}}}if(n=="x"){return{n:"x",v:0,t:names[n]}}v=new Number(RegExp.$1);if(n=="so"){v=((v<100)&&1)||((v<130)&&1.2)||((v<320)&&1.3)||((v<520)&&2)||((v<524)&&3)||((v<526)&&3.2)||4;n="s"}if(n=="i"&&v==7&&window.XDomainRequest){v=8}return{n:n,v:v,t:names[n]+" "+v}}this.op.browser=getBrowser();if(!this.op.test&&(!this.op.browser||!this.op.browser.n||this.op.browser.n=="x"||this.op.browser.n=="c"||document.cookie.indexOf("browserupdateorg=pause")>-1||this.op.browser.v>this.op.vs[this.op.browser.n])){return}if(this.op.reminder>0){var d=new Date(new Date().getTime()+1000*3600*this.op.reminder);document.cookie="browserupdateorg=pause; expires="+d.toGMTString()+"; path=/"}var ll=this.op.l.substr(0,2);var languages="de,en";if(languages.indexOf(ll)!==false){this.op.url="http://browser-update.org/"+ll+"/update.html#"+jsv}var tar="";if(this.op.newwindow){tar=' target="_blank"'}function busprintf(){var args=arguments;var data=args[0];for(var k=1;k<args.length;++k){data=data.replace(/%s/,args[k])}return data}ll=(window.Locale)?Locale.getCurrent().name:"en-US";var t="Your browser (%s) is <b>out of date</b>. It has known <b>security flaws</b> and may <b>not display all features</b> of this and other websites. <a%s>Learn how to update your browser</a>";if(ll=="de-DE"){t="Sie verwenden einen <b>veralteten Browser</b> (%s) mit <b>Sicherheitsschwachstellen</b> und <b>können nicht alle Funktionen dieser Webseite nutzen</b>. <a%s>Hier erfahren Sie, wie einfach Sie Ihren Browser aktualisieren können</a>."}if(op.text){t=op.text}this.op.text=busprintf(t,this.op.browser.t,' href="'+this.op.url+'"'+tar);var div=document.createElement("div");this.op.div=div;div.id="buorg";div.className="buorg";div.innerHTML="<div>"+this.op.text+'<div id="buorgclose">X</div></div>';var sheet=document.createElement("style");var style=".buorg {position:absolute;z-index:111111; width:100%; top:0px; left:0px; border-bottom:1px solid #A29330; background:#FDF2AB no-repeat 10px center url(http://browser-update.org/img/dialog-warning.gif); text-align:left; cursor:pointer; font-family: Arial,Helvetica,sans-serif; color:#000; font-size: 12px;} .buorg div { padding:5px 36px 5px 40px; } .buorg a,.buorg a:visited {color:#E25600; text-decoration: underline;} #buorgclose { position: absolute; right: .5em; top:.2em; height: 20px; width: 12px; font-weight: bold;font-size:14px; padding:0; }";document.body.insertBefore(div,document.body.firstChild);document.getElementsByTagName("head")[0].appendChild(sheet);try{sheet.innerText=style;sheet.innerHTML=style}catch(e){try{sheet.styleSheet.cssText=style}catch(e){return}}var me=this;div.onclick=function(){if(me.op.newwindow){window.open(me.op.url,"_blank")}else{window.location.href=me.op.url}return false};div.getElementsByTagName("a")[0].onclick=function(e){var e=e||window.event;if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}return true};this.op.bodymt=document.body.style.paddingTop;document.body.style.paddingTop=(div.clientHeight)+"px";document.getElementById("buorgclose").onclick=function(e){var e=e||window.event;if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}me.op.div.style.display="none";document.body.style.paddingTop=me.op.bodymt;return true};op.onshow(this.op)}});var Ajaxify=new Class({version:0.2,Implements:[Options,Events],options:{events:{loading:{name:"ajax:loading",text:"Loading…"},success:{name:"ajax:success",text:"Changes successfully saved!"},failure:{name:"ajax:failure",text:"Oops, something went wrong…"}},holder:new Element("div#ajax_holder"),fadeOutDuration:2000},initialize:function(_options){this.setOptions(_options);this.holder=this.options.holder.inject(document.body)},applyEvents:function(el){el=document.id(el||document.body);var apply=function(action,callback){el.getElements('[data-remote="true"]').addEvent(action,callback)};apply(this.options.events.loading.name,this.loading.bind(this));apply(this.options.events.success.name,this.success.bind(this));apply(this.options.events.failure.name,this.failure.bind(this))},loading:function(xhr){this.setMessage("loading",false)},success:function(xhr){this.setMessage("success",true)},failure:function(xhr){this.setMessage("failure",true)},setMessage:function(status,fadeOut){this.holder.set("text",this.options.events[status].text).set("class",status);if(fadeOut){this.holder.addClass("fadeout");setTimeout(function(){this.holder.erase("class")}.bind(this),this.options.fadeOutDuration)}}});var AjaxEdit=new Class({version:0.2,options:{holderParent:document.body},Implements:[Options,Events],holder:new Element("div.quick_edit_holder"),initialize:function(_options){this.setOptions(_options);this.holder.addEvents({"click:relay(.open)":function(e){e.preventDefault();location.href=this.wrapElement.getElement("a").get("href")}.bind(this),"click:relay(.cancel)":function(e){e.preventDefault();this.close()}.bind(this),"click:relay(.save_and_next)":function(e){e.preventDefault();this.submit(["successAndChange","successAndNext"])}.bind(this),"click:relay(.save)":function(e){e.preventDefault();this.submit(["successAndChange"])}.bind(this),"submit:relay(form)":function(e){e.preventDefault();this.submit(["successAndChange"])}.bind(this)})},startEdit:function(element,wrapElement){this.clean();this.wrapElement=wrapElement?wrapElement:element;this.wrapElement.addClass("live_edit");this.fireEvent("startRequest");new Request.HTML({method:"get",evalScripts:false,url:element.get("href"),onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){this.injectForm(responseHTML);eval(responseJavaScript)}.bind(this)}).send()},submit:function(eventNames){var form=this.holder.getElement("form");this.fireEvent("beforeSubmit");new Request.JSON({method:form.get("method"),url:form.get("action"),evalScripts:true,onRequest:function(){this.disableButtons()}.bind(this),onFailure:function(invalidForm){this.injectForm(invalidForm.response);invalidForm.response.stripScripts(function(script){eval(script)})}.bind(this),onSuccess:function(json){if(!eventNames.contains("successAndNext")){this.close()}eventNames.each(function(eventName){this.fireEvent(eventName,[json])}.bind(this));this.fireEvent("save")}.bind(this)}).send({data:form})},disableButtons:function(){this.holder.getElements(".open, .cancel, .save_and_next, .save").set("disabled","disabled")},clean:function(){document.body.getElements(".live_edit").removeClass("live_edit")},close:function(){this.clean();this.holder.dispose()},injectForm:function(form){this.holder.innerHTML=form;this.holder.inject(this.options.holderParent);this.fireEvent("formInjected",[this.holder])}});(function(){var blockEls=/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|SCRIPT|NOSCRIPT|STYLE)$/i;var urlRegex=/^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i;var protectRegex=/<(script|noscript|style)[\u0000-\uFFFF]*?<\/(script|noscript|style)>/g;this.MooEditable=new Class({Implements:[Events,Options],options:{toolbar:true,cleanup:true,paragraphise:true,xhtml:true,semantics:true,actions:"bold italic underline strikethrough | insertunorderedlist insertorderedlist indent outdent | undo redo | createlink unlink | urlimage | toggleview",handleSubmit:true,handleLabel:true,disabled:false,baseCSS:"html{ height: 100%; cursor: text; } body{ font-family: sans-serif; }",extraCSS:"",externalCSS:"",html:'<!DOCTYPE html><html><head><meta charset="UTF-8">{BASEHREF}<style>{BASECSS} {EXTRACSS}</style>{EXTERNALCSS}</head><body></body></html>',rootElement:"p",baseURL:"",dimensions:null},initialize:function(el,options){this.setOptions(options);this.textarea=document.id(el);this.textarea.store("MooEditable",this);this.actions=this.options.actions.clean().split(" ");this.keys={};this.dialogs={};this.protectedElements=[];this.actions.each(function(action){var act=MooEditable.Actions[action];if(!act){return}if(act.options){var key=act.options.shortcut;if(key){this.keys[key]=action}}if(act.dialogs){Object.each(act.dialogs,function(dialog,name){dialog=dialog.attempt(this);dialog.name=action+":"+name;if(typeOf(this.dialogs[action])!="object"){this.dialogs[action]={}}this.dialogs[action][name]=dialog},this)}if(act.events){Object.each(act.events,function(fn,event){this.addEvent(event,fn)},this)}}.bind(this));this.render()},toElement:function(){return this.textarea},render:function(){var self=this;var dimensions=this.options.dimensions||this.textarea.getSize();this.container=new Element("div",{id:(this.textarea.id)?this.textarea.id+"-mooeditable-container":null,"class":"mooeditable-container",styles:{width:dimensions.x}});this.textarea.addClass("mooeditable-textarea").setStyle("height",dimensions.y);this.iframe=new IFrame({"class":"mooeditable-iframe",frameBorder:0,src:'javascript:""',styles:{height:dimensions.y}});this.toolbar=new MooEditable.UI.Toolbar({onItemAction:function(){var args=Array.from(arguments);var item=args[0];self.action(item.name,args)}});this.attach.delay(1,this);if(this.options.handleLabel&&this.textarea.id){$$('label[for="'+this.textarea.id+'"]').addEvent("click",function(e){if(self.mode!="iframe"){return}e.preventDefault();self.focus()})}if(this.options.handleSubmit){this.form=this.textarea.getParent("form");if(!this.form){return}this.form.addEvent("submit",function(){if(self.mode=="iframe"){self.saveContent()}})}this.fireEvent("render",this)},attach:function(){var self=this;this.mode="iframe";this.editorDisabled=false;this.container.wraps(this.textarea);this.textarea.setStyle("display","none");this.iframe.setStyle("display","").inject(this.textarea,"before");Object.each(this.dialogs,function(action,name){Object.each(action,function(dialog){document.id(dialog).inject(self.iframe,"before");var range;dialog.addEvents({open:function(){range=self.selection.getRange();self.editorDisabled=true;self.toolbar.disable(name);self.fireEvent("dialogOpen",this)},close:function(){self.toolbar.enable();self.editorDisabled=false;self.focus();if(range){self.selection.setRange(range)}self.fireEvent("dialogClose",this)}})})});this.win=this.iframe.contentWindow;this.doc=this.win.document;if(Browser.firefox){this.doc.designMode="On"}var docHTML=this.options.html.substitute({BASECSS:this.options.baseCSS,EXTRACSS:this.options.extraCSS,EXTERNALCSS:(this.options.externalCSS)?'<link rel="stylesheet" href="'+this.options.externalCSS+'">':"",BASEHREF:(this.options.baseURL)?'<base href="'+this.options.baseURL+'" />':""});this.doc.open();this.doc.write(docHTML);this.doc.close();(Browser.ie)?this.doc.body.contentEditable=true:this.doc.designMode="On";Object.append(this.win,new Window);Object.append(this.doc,new Document);if(Browser.Element){var winElement=this.win.Element.prototype;for(var method in Element){if(!method.test(/^[A-Z]|\$|prototype|mooEditable/)){winElement[method]=Element.prototype[method]}}}else{document.id(this.doc.body)}this.setContent(this.textarea.get("value"));this.doc.addEvents({mouseup:this.editorMouseUp.bind(this),mousedown:this.editorMouseDown.bind(this),mouseover:this.editorMouseOver.bind(this),mouseout:this.editorMouseOut.bind(this),mouseenter:this.editorMouseEnter.bind(this),mouseleave:this.editorMouseLeave.bind(this),contextmenu:this.editorContextMenu.bind(this),click:this.editorClick.bind(this),dblclick:this.editorDoubleClick.bind(this),keypress:this.editorKeyPress.bind(this),keyup:this.editorKeyUp.bind(this),keydown:this.editorKeyDown.bind(this),focus:this.editorFocus.bind(this),blur:this.editorBlur.bind(this)});this.win.addEvents({focus:this.editorFocus.bind(this),blur:this.editorBlur.bind(this)});["cut","copy","paste"].each(function(event){self.doc.body.addListener(event,self["editor"+event.capitalize()].bind(self))});this.textarea.addEvent("keypress",this.textarea.retrieve("mooeditable:textareaKeyListener",this.keyListener.bind(this)));if(Browser.firefox2){this.doc.addEvent("focus",function(){self.win.fireEvent("focus").focus()})}if(this.doc.addEventListener){this.doc.addEventListener("focus",function(){self.win.fireEvent("focus")},true)}if(!Browser.ie&&!Browser.opera){var styleCSS=function(){self.execute("styleWithCSS",false,false);self.doc.removeEvent("focus",styleCSS)};this.win.addEvent("focus",styleCSS)}if(this.options.toolbar){document.id(this.toolbar).inject(this.container,"top");this.toolbar.render(this.actions)}if(this.options.disabled){this.disable()}this.selection=new MooEditable.Selection(this.win);this.oldContent=this.getContent();this.fireEvent("attach",this);return this},detach:function(){this.saveContent();this.textarea.setStyle("display","").removeClass("mooeditable-textarea").inject(this.container,"before");this.textarea.removeEvent("keypress",this.textarea.retrieve("mooeditable:textareaKeyListener"));this.container.dispose();this.fireEvent("detach",this);return this},enable:function(){this.editorDisabled=false;this.toolbar.enable();return this},disable:function(){this.editorDisabled=true;this.toolbar.disable();return this},editorFocus:function(e){this.oldContent="";this.fireEvent("editorFocus",[e,this])},editorBlur:function(e){this.oldContent=this.saveContent().getContent();this.fireEvent("editorBlur",[e,this])},editorMouseUp:function(e){if(this.editorDisabled){e.stop();return}if(this.options.toolbar){this.checkStates()}this.fireEvent("editorMouseUp",[e,this])},editorMouseDown:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorMouseDown",[e,this])},editorMouseOver:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorMouseOver",[e,this])},editorMouseOut:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorMouseOut",[e,this])},editorMouseEnter:function(e){if(this.editorDisabled){e.stop();return}if(this.oldContent&&this.getContent()!=this.oldContent){this.focus();this.fireEvent("editorPaste",[e,this])}this.fireEvent("editorMouseEnter",[e,this])},editorMouseLeave:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorMouseLeave",[e,this])},editorContextMenu:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorContextMenu",[e,this])},editorClick:function(e){if(Browser.safari||Browser.chrome){var el=e.target;if(Element.get(el,"tag")=="img"){if(this.options.baseURL){if(el.getProperty("src").indexOf("http://")==-1){el.setProperty("src",this.options.baseURL+el.getProperty("src"))}}this.selection.selectNode(el);this.checkStates()}}this.fireEvent("editorClick",[e,this])},editorDoubleClick:function(e){this.fireEvent("editorDoubleClick",[e,this])},editorKeyPress:function(e){if(this.editorDisabled){e.stop();return}this.keyListener(e);this.fireEvent("editorKeyPress",[e,this])},editorKeyUp:function(e){if(this.editorDisabled){e.stop();return}var c=e.code;if(this.options.toolbar&&(/^enter|left|up|right|down|delete|backspace$/i.test(e.key)||(c>=33&&c<=36)||c==45||e.meta||e.control)){if(Browser.ie6){clearTimeout(this.checkStatesDelay);this.checkStatesDelay=this.checkStates.delay(500,this)}else{this.checkStates()}}this.fireEvent("editorKeyUp",[e,this])},editorKeyDown:function(e){if(this.editorDisabled){e.stop();return}if(e.key=="enter"){if(this.options.paragraphise){if(e.shift&&(Browser.safari||Browser.chrome)){var s=this.selection;var r=s.getRange();var br=this.doc.createElement("br");r.insertNode(br);r.setStartAfter(br);r.setEndAfter(br);s.setRange(r);if(s.getSelection().focusNode==br.previousSibling){var nbsp=this.doc.createTextNode("\u00a0");var p=br.parentNode;var ns=br.nextSibling;(ns)?p.insertBefore(nbsp,ns):p.appendChild(nbsp);s.selectNode(nbsp);s.collapse(1)}this.win.scrollTo(0,Element.getOffsets(s.getRange().startContainer).y);e.preventDefault()}else{if(Browser.firefox||Browser.safari||Browser.chrome){var node=this.selection.getNode();var isBlock=Element.getParents(node).include(node).some(function(el){return el.nodeName.test(blockEls)});if(!isBlock){this.execute("insertparagraph")}}}}else{if(Browser.ie){var r=this.selection.getRange();var node=this.selection.getNode();if(r&&node.get("tag")!="li"){this.selection.insertContent("<br>");this.selection.collapse(false)}e.preventDefault()}}}if(Browser.opera){var ctrlmeta=e.control||e.meta;if(ctrlmeta&&e.key=="x"){this.fireEvent("editorCut",[e,this])}else{if(ctrlmeta&&e.key=="c"){this.fireEvent("editorCopy",[e,this])}else{if((ctrlmeta&&e.key=="v")||(e.shift&&e.code==45)){this.fireEvent("editorPaste",[e,this])}}}}this.fireEvent("editorKeyDown",[e,this])},editorCut:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorCut",[e,this])},editorCopy:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorCopy",[e,this])},editorPaste:function(e){if(this.editorDisabled){e.stop();return}this.fireEvent("editorPaste",[e,this])},keyListener:function(e){var key=(Browser.Platform.mac)?e.meta:e.control;if(!key||!this.keys[e.key]){return}e.preventDefault();var item=this.toolbar.getItem(this.keys[e.key]);item.action(e)},focus:function(){(this.mode=="iframe"?this.win:this.textarea).focus();this.fireEvent("focus",this);return this},action:function(command,args){var action=MooEditable.Actions[command];if(action.command&&typeOf(action.command)=="function"){action.command.apply(this,args)}else{this.focus();this.execute(command,false,args);if(this.mode=="iframe"){this.checkStates()}}},execute:function(command,param1,param2){if(this.busy){return}this.busy=true;this.doc.execCommand(command,param1,param2);this.saveContent();this.busy=false;return false},toggleView:function(){this.fireEvent("beforeToggleView",this);if(this.mode=="textarea"){this.mode="iframe";this.iframe.setStyle("display","");this.setContent(this.textarea.value);this.textarea.setStyle("display","none")}else{this.saveContent();this.mode="textarea";this.textarea.setStyle("display","");this.iframe.setStyle("display","none")}this.fireEvent("toggleView",this);this.focus.delay(10,this);return this},getContent:function(){var protect=this.protectedElements;var html=this.doc.body.get("html").replace(/<!-- mooeditable:protect:([0-9]+) -->/g,function(a,b){return protect[b.toInt()]});return this.cleanup(this.ensureRootElement(html))},setContent:function(content){var protect=this.protectedElements;content=content.replace(protectRegex,function(a){protect.push(a);return"<!-- mooeditable:protect:"+(protect.length-1)+" -->"});this.doc.body.set("html",this.ensureRootElement(content));return this},saveContent:function(){if(this.mode=="iframe"){this.textarea.set("value",this.getContent())}return this},ensureRootElement:function(val){if(this.options.rootElement){var el=new Element("div",{html:val.trim()});var start=-1;var create=false;var html="";var length=el.childNodes.length;for(var i=0;i<length;i++){var childNode=el.childNodes[i];var nodeName=childNode.nodeName;if(!nodeName.test(blockEls)&&nodeName!=="#comment"){if(nodeName==="#text"){if(childNode.nodeValue.trim()){if(start<0){start=i}html+=childNode.nodeValue}}else{if(start<0){start=i}html+=new Element("div").adopt($(childNode).clone()).get("html")}}else{create=true}if(i==(length-1)){create=true}if(start>=0&&create){var newel=new Element(this.options.rootElement,{html:html});el.replaceChild(newel,el.childNodes[start]);for(var k=start+1;k<i;k++){el.removeChild(el.childNodes[k]);length--;i--;k--}start=-1;create=false;html=""}}val=el.get("html").replace(/\n\n/g,"")}return val},checkStates:function(){var element=this.selection.getNode();if(!element){return}if(typeOf(element)!="element"){return}this.actions.each(function(action){var item=this.toolbar.getItem(action);if(!item){return}item.deactivate();var states=MooEditable.Actions[action]["states"];if(!states){return}if(typeOf(states)=="function"){states.attempt([document.id(element),item],this);return}try{if(this.doc.queryCommandState(action)){item.activate();return}}catch(e){}if(states.tags){var el=element;do{var tag=el.tagName.toLowerCase();if(states.tags.contains(tag)){item.activate(tag);break}}while((el=Element.getParent(el))!=null)}if(states.css){var el=element;do{var found=false;for(var prop in states.css){var css=states.css[prop];if(el.style[prop.camelCase()].contains(css)){item.activate(css);found=true}}if(found||el.tagName.test(blockEls)){break}}while((el=Element.getParent(el))!=null)}}.bind(this))},cleanup:function(source){if(!this.options.cleanup){return source.trim()}do{var oSource=source;if(this.options.baseURL){source=source.replace('="'+this.options.baseURL,'="')}source=source.replace(/<br class\="webkit-block-placeholder">/gi,"<br />");source=source.replace(/<span class="Apple-style-span">(.*)<\/span>/gi,"$1");source=source.replace(/ class="Apple-style-span"/gi,"");source=source.replace(/<span style="">/gi,"");source=source.replace(/<p>\s*<br ?\/?>\s*<\/p>/gi,"<p>\u00a0</p>");source=source.replace(/<p>( |\s)*<\/p>/gi,"<p>\u00a0</p>");if(!this.options.semantics){source=source.replace(/\s*<br ?\/?>\s*<\/p>/gi,"</p>")}if(this.options.xhtml){source=source.replace(/<br>/gi,"<br />")}if(this.options.semantics){if(Browser.ie){source=source.replace(/<li>\s*<div>(.+?)<\/div><\/li>/g,"<li>$1</li>")}if(Browser.safari||Browser.chrome){source=source.replace(/^([\w\s]+.*?)<div>/i,"<p>$1</p><div>");source=source.replace(/<div>(.+?)<\/div>/ig,"<p>$1</p>")}if(!Browser.ie){source=source.replace(/<p>[\s\n]*(<(?:ul|ol)>.*?<\/(?:ul|ol)>)(.*?)<\/p>/ig,"$1<p>$2</p>");source=source.replace(/<\/(ol|ul)>\s*(?!<(?:p|ol|ul|img).*?>)((?:<[^>]*>)?\w.*)$/g,"</$1><p>$2</p>")}source=source.replace(/<br[^>]*><\/p>/g,"</p>");source=source.replace(/<p>\s*(<img[^>]+>)\s*<\/p>/ig,"$1\n");source=source.replace(/<p([^>]*)>(.*?)<\/p>(?!\n)/g,"<p$1>$2</p>\n");source=source.replace(/<\/(ul|ol|p)>(?!\n)/g,"</$1>\n");source=source.replace(/><li>/g,">\n\t<li>");source=source.replace(/([^\n])<\/(ol|ul)>/g,"$1\n</$2>");source=source.replace(/([^\n])<img/ig,"$1\n<img");source=source.replace(/^\s*$/g,"")}source=source.replace(/<br ?\/?>$/gi,"");source=source.replace(/^<br ?\/?>/gi,"");if(this.options.paragraphise){source=source.replace(/(h[1-6]|p|div|address|pre|li|ol|ul|blockquote|center|dl|dt|dd)><br ?\/?>/gi,"$1>")}source=source.replace(/<br ?\/?>\s*<\/(h1|h2|h3|h4|h5|h6|li|p)/gi,"</$1");source=source.replace(/<span style="font-weight: bold;">(.*)<\/span>/gi,"<strong>$1</strong>");source=source.replace(/<span style="font-style: italic;">(.*)<\/span>/gi,"<em>$1</em>");source=source.replace(/<b\b[^>]*>(.*?)<\/b[^>]*>/gi,"<strong>$1</strong>");source=source.replace(/<i\b[^>]*>(.*?)<\/i[^>]*>/gi,"<em>$1</em>");source=source.replace(/<u\b[^>]*>(.*?)<\/u[^>]*>/gi,'<span style="text-decoration: underline;">$1</span>');source=source.replace(/<strong><span style="font-weight: normal;">(.*)<\/span><\/strong>/gi,"$1");source=source.replace(/<em><span style="font-weight: normal;">(.*)<\/span><\/em>/gi,"$1");source=source.replace(/<span style="text-decoration: underline;"><span style="font-weight: normal;">(.*)<\/span><\/span>/gi,"$1");source=source.replace(/<strong style="font-weight: normal;">(.*)<\/strong>/gi,"$1");source=source.replace(/<em style="font-weight: normal;">(.*)<\/em>/gi,"$1");source=source.replace(/<[^> ]*/g,function(match){return match.toLowerCase()});source=source.replace(/<[^>]*>/g,function(match){match=match.replace(/ [^=]+=/g,function(match2){return match2.toLowerCase()});return match});source=source.replace(/<[^!][^>]*>/g,function(match){match=match.replace(/( [^=]+=)([^"][^ >]*)/g,'$1"$2"');return match});if(this.options.xhtml){source=source.replace(/<img([^>]+)(\s*[^\/])>(<\/img>)*/gi,"<img$1$2 />")}source=source.replace(/<p>(?:\s*)<p>/g,"<p>");source=source.replace(/<\/p>\s*<\/p>/g,"</p>");source=source.replace(/<pre[^>]*>.*?<\/pre>/gi,function(match){return match.replace(/<br ?\/?>/gi,"\n")});source=source.trim()}while(source!=oSource);return source}});MooEditable.Selection=new Class({initialize:function(win){this.win=win},getSelection:function(){this.win.focus();return(this.win.getSelection)?this.win.getSelection():this.win.document.selection},getRange:function(){var s=this.getSelection();if(!s){return null}try{return s.rangeCount>0?s.getRangeAt(0):(s.createRange?s.createRange():null)}catch(e){return this.doc.body.createTextRange()}},setRange:function(range){if(range.select){Function.attempt(function(){range.select()})}else{var s=this.getSelection();if(s.addRange){s.removeAllRanges();s.addRange(range)}}},selectNode:function(node,collapse){var r=this.getRange();var s=this.getSelection();if(r.moveToElementText){Function.attempt(function(){r.moveToElementText(node);r.select()})}else{if(s.addRange){collapse?r.selectNodeContents(node):r.selectNode(node);s.removeAllRanges();s.addRange(r)}else{s.setBaseAndExtent(node,0,node,1)}}return node},isCollapsed:function(){var r=this.getRange();if(r.item){return false}return r.boundingWidth==0||this.getSelection().isCollapsed},collapse:function(toStart){var r=this.getRange();var s=this.getSelection();if(r.select){r.collapse(toStart);r.select()}else{toStart?s.collapseToStart():s.collapseToEnd()}},getContent:function(){var r=this.getRange();var body=new Element("body");if(this.isCollapsed()){return""}if(r.cloneContents){body.appendChild(r.cloneContents())}else{if(r.item!=undefined||r.htmlText!=undefined){body.set("html",r.item?r.item(0).outerHTML:r.htmlText)}else{body.set("html",r.toString())}}var content=body.get("html");return content},getText:function(){var r=this.getRange();var s=this.getSelection();return this.isCollapsed()?"":r.text||(s.toString?s.toString():"")},getNode:function(){var r=this.getRange();if(!Browser.ie||Browser.version>=9){var el=null;if(r){el=r.commonAncestorContainer;if(!r.collapsed){if(r.startContainer==r.endContainer){if(r.startOffset-r.endOffset<2){if(r.startContainer.hasChildNodes()){el=r.startContainer.childNodes[r.startOffset]}}}}while(typeOf(el)!="element"){el=el.parentNode}}return document.id(el)}return document.id(r.item?r.item(0):r.parentElement())},insertContent:function(content){if(Browser.ie){var r=this.getRange();if(r.pasteHTML){r.pasteHTML(content);r.collapse(false);r.select()}else{if(r.insertNode){r.deleteContents();if(r.createContextualFragment){r.insertNode(r.createContextualFragment(content))}else{var doc=this.win.document;var fragment=doc.createDocumentFragment();var temp=doc.createElement("div");fragment.appendChild(temp);temp.outerHTML=content;r.insertNode(fragment)}}}}else{this.win.document.execCommand("insertHTML",false,content)}}});var phrases={};MooEditable.Locale={define:function(key,value){if(typeOf(window.Locale)!="null"){return Locale.define("en-US","MooEditable",key,value)}if(typeOf(key)=="object"){Object.merge(phrases,key)}else{phrases[key]=value}},get:function(key){if(typeOf(window.Locale)!="null"){return Locale.get("MooEditable."+key)}return key?phrases[key]:""}};MooEditable.Locale.define({ok:"OK",cancel:"Cancel",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",unorderedList:"Unordered List",orderedList:"Ordered List",indent:"Indent",outdent:"Outdent",undo:"Undo",redo:"Redo",removeHyperlink:"Remove Hyperlink",addHyperlink:"Add Hyperlink",selectTextHyperlink:"Please select the text you wish to hyperlink.",enterURL:"Enter URL",enterImageURL:"Enter image URL",addImage:"Add Image",toggleView:"Toggle View"});MooEditable.UI={};MooEditable.UI.Toolbar=new Class({Implements:[Events,Options],options:{"class":""},initialize:function(options){this.setOptions(options);this.el=new Element("div",{"class":"mooeditable-ui-toolbar "+this.options["class"]});this.items={};this.content=null},toElement:function(){return this.el},render:function(actions){if(this.content){this.el.adopt(this.content)}else{this.content=actions.map(function(action){return(action=="|")?this.addSeparator():this.addItem(action)}.bind(this))}return this},addItem:function(action){var self=this;var act=MooEditable.Actions[action];if(!act){return}var type=act.type||"button";var options=act.options||{};var item=new MooEditable.UI[type.camelCase().capitalize()](Object.append(options,{name:action,"class":action+"-item toolbar-item",title:act.title,onAction:self.itemAction.bind(self)}));this.items[action]=item;document.id(item).inject(this.el);return item},getItem:function(action){return this.items[action]},addSeparator:function(){return new Element("span",{"class":"toolbar-separator"}).inject(this.el)},itemAction:function(){this.fireEvent("itemAction",arguments)},disable:function(except){Object.each(this.items,function(item){(item.name==except)?item.activate():item.deactivate().disable()});return this},enable:function(){Object.each(this.items,function(item){item.enable()});return this},show:function(){this.el.setStyle("display","");return this},hide:function(){this.el.setStyle("display","none");return this}});MooEditable.UI.Button=new Class({Implements:[Events,Options],options:{title:"",name:"",text:"Button","class":"",shortcut:"",mode:"icon"},initialize:function(options){this.setOptions(options);this.name=this.options.name;this.render()},toElement:function(){return this.el},render:function(){var self=this;var key=(Browser.Platform.mac)?"Cmd":"Ctrl";var shortcut=(this.options.shortcut)?" ( "+key+"+"+this.options.shortcut.toUpperCase()+" )":"";var text=this.options.title||name;var title=text+shortcut;this.el=new Element("button",{"class":"mooeditable-ui-button "+self.options["class"],title:title,html:'<span class="button-icon"></span><span class="button-text">'+text+"</span>",events:{click:self.click.bind(self),mousedown:function(e){e.preventDefault()}}});if(this.options.mode!="icon"){this.el.addClass("mooeditable-ui-button-"+this.options.mode)}this.active=false;this.disabled=false;if(Browser.ie){this.el.addEvents({mouseenter:function(e){this.addClass("hover")},mouseleave:function(e){this.removeClass("hover")}})}return this},click:function(e){e.preventDefault();if(this.disabled){return}this.action(e)},action:function(){this.fireEvent("action",[this].concat(Array.from(arguments)))},enable:function(){if(this.active){this.el.removeClass("onActive")}if(!this.disabled){return}this.disabled=false;this.el.removeClass("disabled").set({disabled:false,opacity:1});return this},disable:function(){if(this.disabled){return}this.disabled=true;this.el.addClass("disabled").set({disabled:true,opacity:0.4});return this},activate:function(){if(this.disabled){return}this.active=true;this.el.addClass("onActive");return this},deactivate:function(){this.active=false;this.el.removeClass("onActive");return this}});MooEditable.UI.Dialog=new Class({Implements:[Events,Options],options:{"class":"",contentClass:""},initialize:function(html,options){this.setOptions(options);this.html=html;var self=this;this.el=new Element("div",{"class":"mooeditable-ui-dialog "+self.options["class"],html:'<div class="dialog-content '+self.options.contentClass+'">'+html+"</div>",styles:{display:"none"},events:{click:self.click.bind(self)}})},toElement:function(){return this.el},click:function(){this.fireEvent("click",arguments);return this},open:function(){this.el.setStyle("display","");this.fireEvent("open",this);return this},close:function(){this.el.setStyle("display","none");this.fireEvent("close",this);return this}});MooEditable.UI.AlertDialog=function(alertText){if(!alertText){return}var html=alertText+' <button class="dialog-ok-button">'+MooEditable.Locale.get("ok")+"</button>";return new MooEditable.UI.Dialog(html,{"class":"mooeditable-alert-dialog",onOpen:function(){var button=this.el.getElement(".dialog-ok-button");(function(){button.focus()}).delay(10)},onClick:function(e){e.preventDefault();if(e.target.tagName.toLowerCase()!="button"){return}if(document.id(e.target).hasClass("dialog-ok-button")){this.close()}}})};MooEditable.UI.PromptDialog=function(questionText,answerText,fn){if(!questionText){return}var html='<label class="dialog-label">'+questionText+' <input type="text" class="text dialog-input" value="'+answerText+'"></label> <button class="dialog-button dialog-ok-button">'+MooEditable.Locale.get("ok")+'</button><button class="dialog-button dialog-cancel-button">'+MooEditable.Locale.get("cancel")+"</button>";return new MooEditable.UI.Dialog(html,{"class":"mooeditable-prompt-dialog",onOpen:function(){var input=this.el.getElement(".dialog-input");(function(){input.focus();input.select()}).delay(10)},onClick:function(e){e.preventDefault();if(e.target.tagName.toLowerCase()!="button"){return}var button=document.id(e.target);var input=this.el.getElement(".dialog-input");if(button.hasClass("dialog-cancel-button")){input.set("value",answerText);this.close()}else{if(button.hasClass("dialog-ok-button")){var answer=input.get("value");input.set("value",answerText);this.close();if(fn){fn.attempt(answer,this)}}}}})};MooEditable.Actions={bold:{title:MooEditable.Locale.get("bold"),options:{shortcut:"b"},states:{tags:["b","strong"],css:{"font-weight":"bold"}},events:{beforeToggleView:function(){if(Browser.firefox){var value=this.textarea.get("value");var newValue=value.replace(/<strong([^>]*)>/gi,"<b$1>").replace(/<\/strong>/gi,"</b>");if(value!=newValue){this.textarea.set("value",newValue)}}},attach:function(){if(Browser.firefox){var value=this.textarea.get("value");var newValue=value.replace(/<strong([^>]*)>/gi,"<b$1>").replace(/<\/strong>/gi,"</b>");if(value!=newValue){this.textarea.set("value",newValue);this.setContent(newValue)}}}}},italic:{title:MooEditable.Locale.get("italic"),options:{shortcut:"i"},states:{tags:["i","em"],css:{"font-style":"italic"}},events:{beforeToggleView:function(){if(Browser.firefox){var value=this.textarea.get("value");var newValue=value.replace(/<embed([^>]*)>/gi,"<tmpembed$1>").replace(/<em([^>]*)>/gi,"<i$1>").replace(/<tmpembed([^>]*)>/gi,"<embed$1>").replace(/<\/em>/gi,"</i>");if(value!=newValue){this.textarea.set("value",newValue)}}},attach:function(){if(Browser.firefox){var value=this.textarea.get("value");var newValue=value.replace(/<embed([^>]*)>/gi,"<tmpembed$1>").replace(/<em([^>]*)>/gi,"<i$1>").replace(/<tmpembed([^>]*)>/gi,"<embed$1>").replace(/<\/em>/gi,"</i>");if(value!=newValue){this.textarea.set("value",newValue);this.setContent(newValue)}}}}},underline:{title:MooEditable.Locale.get("underline"),options:{shortcut:"u"},states:{tags:["u"],css:{"text-decoration":"underline"}}},strikethrough:{title:MooEditable.Locale.get("strikethrough"),options:{shortcut:"s"},states:{tags:["s","strike"],css:{"text-decoration":"line-through"}}},insertunorderedlist:{title:MooEditable.Locale.get("unorderedList"),states:{tags:["ul"]}},insertorderedlist:{title:MooEditable.Locale.get("orderedList"),states:{tags:["ol"]}},indent:{title:MooEditable.Locale.get("indent"),states:{tags:["blockquote"]}},outdent:{title:MooEditable.Locale.get("outdent")},undo:{title:MooEditable.Locale.get("undo"),options:{shortcut:"z"}},redo:{title:MooEditable.Locale.get("redo"),options:{shortcut:"y"}},unlink:{title:MooEditable.Locale.get("removeHyperlink")},createlink:{title:MooEditable.Locale.get("addHyperlink"),options:{shortcut:"l"},states:{tags:["a"]},dialogs:{alert:MooEditable.UI.AlertDialog.pass(MooEditable.Locale.get("selectTextHyperlink")),prompt:function(editor){return MooEditable.UI.PromptDialog(MooEditable.Locale.get("enterURL"),"http://",function(url){editor.execute("createlink",false,url.trim())})}},command:function(){var selection=this.selection;var dialogs=this.dialogs.createlink;if(selection.isCollapsed()){var node=selection.getNode();if(node.get("tag")=="a"&&node.get("href")){selection.selectNode(node);var prompt=dialogs.prompt;prompt.el.getElement(".dialog-input").set("value",node.get("href"));prompt.open()}else{dialogs.alert.open()}}else{var text=selection.getText();var prompt=dialogs.prompt;if(urlRegex.test(text)){prompt.el.getElement(".dialog-input").set("value",text)}prompt.open()}}},urlimage:{title:MooEditable.Locale.get("addImage"),options:{shortcut:"m"},dialogs:{prompt:function(editor){return MooEditable.UI.PromptDialog(MooEditable.Locale.get("enterImageURL"),"http://",function(url){editor.execute("insertimage",false,url.trim())})}},command:function(){this.dialogs.urlimage.prompt.open()}},toggleview:{title:MooEditable.Locale.get("toggleView"),command:function(){(this.mode=="textarea")?this.toolbar.enable():this.toolbar.disable("toggleview");this.toggleView()}}};MooEditable.Actions.Settings={};Element.Properties.mooeditable={get:function(){return this.retrieve("MooEditable")}};Element.implement({mooEditable:function(options){var mooeditable=this.get("mooeditable");if(!mooeditable){mooeditable=new MooEditable(this,options)}return mooeditable}})})();var DatePicker=new Class({Implements:Options,d:"",today:"",choice:{},bodysize:{},limit:{},attachTo:null,picker:null,slider:null,oldContents:null,newContents:null,input:null,visual:null,options:{pickerClass:"datepicker",days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayShort:2,monthShort:3,startDay:1,timePicker:false,timePickerOnly:false,yearPicker:true,yearsPerPage:20,format:"d-m-Y",allowEmpty:false,inputOutputFormat:"U",animationDuration:400,useFadeInOut:!Browser.Engine.trident,startView:"month",positionOffset:{x:0,y:0},minDate:null,maxDate:null,debug:false,toggleElements:null,onShow:$empty,onClose:$empty,onSelect:$empty},initialize:function(attachTo,options){this.attachTo=attachTo;this.setOptions(options).attach();if(this.options.timePickerOnly){this.options.timePicker=true;this.options.startView="time"}this.formatMinMaxDates();document.addEvent("mousedown",this.close.bind(this))},formatMinMaxDates:function(){if(this.options.minDate&&this.options.minDate.format){this.options.minDate=this.unformat(this.options.minDate.date,this.options.minDate.format)}if(this.options.maxDate&&this.options.maxDate.format){this.options.maxDate=this.unformat(this.options.maxDate.date,this.options.maxDate.format);this.options.maxDate.setHours(23);this.options.maxDate.setMinutes(59);this.options.maxDate.setSeconds(59)}},attach:function(){if($chk(this.options.toggleElements)){var togglers=$$(this.options.toggleElements);document.addEvents({keydown:function(e){if(e.key=="tab"){this.close(null,true)}}.bind(this)})}$$(this.attachTo).each(function(item,index){if(item.retrieve("datepicker")){return}if($chk(item.get("value"))){var init_clone_val=this.format(new Date(this.unformat(item.get("value"),this.options.inputOutputFormat)),this.options.format)}else{if(!this.options.allowEmpty){var init_clone_val=this.format(new Date(),this.options.format)}else{var init_clone_val=""}}var display=item.getStyle("display");var clone=item.setStyle("display",this.options.debug?display:"none").store("datepicker",true).clone().store("datepicker",true).removeProperty("name").setStyle("display",display).set("value",init_clone_val).inject(item,"after");if($chk(this.options.toggleElements)){togglers[index].setStyle("cursor","pointer").addEvents({click:function(e){this.onFocus(item,clone)}.bind(this)});clone.addEvents({blur:function(){item.set("value",clone.get("value"))}})}else{clone.addEvents({keydown:function(e){if(this.options.allowEmpty&&(e.key=="delete"||e.key=="backspace")){item.set("value","");e.target.set("value","");this.close(null,true)}else{if(e.key=="tab"){this.close(null,true)}else{e.stop()}}}.bind(this),focus:function(e){this.onFocus(item,clone)}.bind(this)})}}.bind(this))},onFocus:function(original_input,visual_input){var init_visual_date,d=visual_input.getCoordinates();if($chk(original_input.get("value"))){init_visual_date=this.unformat(original_input.get("value"),this.options.inputOutputFormat).valueOf()}else{init_visual_date=new Date();if($chk(this.options.maxDate)&&init_visual_date.valueOf()>this.options.maxDate.valueOf()){init_visual_date=new Date(this.options.maxDate.valueOf())}if($chk(this.options.minDate)&&init_visual_date.valueOf()<this.options.minDate.valueOf()){init_visual_date=new Date(this.options.minDate.valueOf())}}this.show({left:d.left+this.options.positionOffset.x,top:d.top+d.height+this.options.positionOffset.y},init_visual_date);this.input=original_input;this.visual=visual_input;this.options.onShow()},dateToObject:function(d){return{year:d.getFullYear(),month:d.getMonth(),day:d.getDate(),hours:d.getHours(),minutes:d.getMinutes(),seconds:d.getSeconds()}},dateFromObject:function(values){var d=new Date();d.setDate(1);["year","month","day","hours","minutes","seconds"].each(function(type){var v=values[type];if(!$chk(v)){return}switch(type){case"day":d.setDate(v);break;case"month":d.setMonth(v);break;case"year":d.setFullYear(v);break;case"hours":d.setHours(v);break;case"minutes":d.setMinutes(v);break;case"seconds":d.setSeconds(v);break}});return d},show:function(position,timestamp){this.formatMinMaxDates();if($chk(timestamp)){this.d=new Date(timestamp)}else{this.d=new Date()}this.today=new Date();this.choice=this.dateToObject(this.d);this.mode=(this.options.startView=="time"&&!this.options.timePicker)?"month":this.options.startView;this.render();this.picker.setStyles(position)},render:function(fx){if(!$chk(this.picker)){this.constructPicker()}else{var o=this.oldContents;this.oldContents=this.newContents;this.newContents=o;this.newContents.empty()}var startDate=new Date(this.d.getTime());this.limit={right:false,left:false};if(this.mode=="decades"){this.renderDecades()}else{if(this.mode=="year"){this.renderYear()}else{if(this.mode=="time"){this.renderTime();this.limit={right:true,left:true}}else{this.renderMonth()}}}this.picker.getElement(".previous").setStyle("visibility",this.limit.left?"hidden":"visible");this.picker.getElement(".next").setStyle("visibility",this.limit.right?"hidden":"visible");this.picker.getElement(".titleText").setStyle("cursor",this.allowZoomOut()?"pointer":"default");this.d=startDate;if(this.picker.getStyle("opacity")==0){this.picker.tween("opacity",0,1)}if($chk(fx)){this.fx(fx)}},fx:function(fx){if(fx=="right"){this.oldContents.setStyles({left:0,opacity:1});this.newContents.setStyles({left:this.bodysize.x,opacity:1});this.slider.setStyle("left",0).tween("left",0,-this.bodysize.x)}else{if(fx=="left"){this.oldContents.setStyles({left:this.bodysize.x,opacity:1});this.newContents.setStyles({left:0,opacity:1});this.slider.setStyle("left",-this.bodysize.x).tween("left",-this.bodysize.x,0)}else{if(fx=="fade"){this.slider.setStyle("left",0);this.oldContents.setStyle("left",0).set("tween",{duration:this.options.animationDuration/2}).tween("opacity",1,0);this.newContents.setStyles({opacity:0,left:0}).set("tween",{duration:this.options.animationDuration}).tween("opacity",0,1)}}}},constructPicker:function(){this.picker=new Element("div",{"class":this.options.pickerClass}).inject(document.body);if(this.options.useFadeInOut){this.picker.setStyle("opacity",0).set("tween",{duration:this.options.animationDuration})}var h=new Element("div",{"class":"header"}).inject(this.picker);var titlecontainer=new Element("div",{"class":"title"}).inject(h);new Element("div",{"class":"previous"}).addEvent("click",this.previous.bind(this)).set("text","«").inject(h);new Element("div",{"class":"next"}).addEvent("click",this.next.bind(this)).set("text","»").inject(h);new Element("div",{"class":"closeButton"}).addEvent("click",this.close.bindWithEvent(this,true)).set("text","x").inject(h);new Element("span",{"class":"titleText"}).addEvent("click",this.zoomOut.bind(this)).inject(titlecontainer);var b=new Element("div",{"class":"body"}).inject(this.picker);this.bodysize=b.getSize();this.slider=new Element("div",{styles:{position:"absolute",top:0,left:0,width:2*this.bodysize.x,height:this.bodysize.y}}).set("tween",{duration:this.options.animationDuration,transition:Fx.Transitions.Quad.easeInOut}).inject(b);this.oldContents=new Element("div",{styles:{position:"absolute",top:0,left:this.bodysize.x,width:this.bodysize.x,height:this.bodysize.y}}).inject(this.slider);this.newContents=new Element("div",{styles:{position:"absolute",top:0,left:0,width:this.bodysize.x,height:this.bodysize.y}}).inject(this.slider)},renderTime:function(){var container=new Element("div",{"class":"time"}).inject(this.newContents);if(this.options.timePickerOnly){this.picker.getElement(".titleText").set("text","Select a time")}else{this.picker.getElement(".titleText").set("text",this.format(this.d,"j M, Y"))}new Element("input",{type:"text","class":"hour"}).set("value",this.leadZero(this.d.getHours())).addEvents({mousewheel:function(e){var i=e.target,v=i.get("value").toInt();i.focus();if(e.wheel>0){v=(v<23)?v+1:0}else{v=(v>0)?v-1:23}i.set("value",this.leadZero(v));e.stop()}.bind(this)}).set("maxlength",2).inject(container);new Element("input",{type:"text","class":"minutes"}).set("value",this.leadZero(this.d.getMinutes())).addEvents({mousewheel:function(e){var i=e.target,v=i.get("value").toInt();i.focus();if(e.wheel>0){v=(v<59)?v+1:0}else{v=(v>0)?v-1:59}i.set("value",this.leadZero(v));e.stop()}.bind(this)}).set("maxlength",2).inject(container);new Element("div",{"class":"separator"}).set("text",":").inject(container);new Element("input",{type:"submit",value:"OK","class":"ok"}).addEvents({click:function(e){e.stop();this.select($merge(this.dateToObject(this.d),{hours:this.picker.getElement(".hour").get("value").toInt(),minutes:this.picker.getElement(".minutes").get("value").toInt()}))}.bind(this)}).set("maxlength",2).inject(container)},renderMonth:function(){var month=this.d.getMonth();this.picker.getElement(".titleText").set("text",this.options.months[month]+" "+this.d.getFullYear());this.d.setDate(1);while(this.d.getDay()!=this.options.startDay){this.d.setDate(this.d.getDate()-1)}var container=new Element("div",{"class":"days"}).inject(this.newContents);var titles=new Element("div",{"class":"titles"}).inject(container);var d,i,classes,e,weekcontainer;for(d=this.options.startDay;d<(this.options.startDay+7);d++){new Element("div",{"class":"title day day"+(d%7)}).set("text",this.options.days[(d%7)].substring(0,this.options.dayShort)).inject(titles)}var available=false;var t=this.today.toDateString();var currentChoice=this.dateFromObject(this.choice).toDateString();for(i=0;i<42;i++){classes=[];classes.push("day");classes.push("day"+this.d.getDay());if(this.d.toDateString()==t){classes.push("today")}if(this.d.toDateString()==currentChoice){classes.push("selected")}if(this.d.getMonth()!=month){classes.push("otherMonth")}if(i%7==0){weekcontainer=new Element("div",{"class":"week week"+(Math.floor(i/7))}).inject(container)}e=new Element("div",{"class":classes.join(" ")}).set("text",this.d.getDate()).inject(weekcontainer);if(this.limited("date")){e.addClass("unavailable");if(available){this.limit.right=true}else{if(this.d.getMonth()==month){this.limit.left=true}}}else{available=true;e.addEvent("click",function(e,d){if(this.options.timePicker){this.d.setDate(d.day);this.d.setMonth(d.month);this.mode="time";this.render("fade")}else{this.select(d)}}.bindWithEvent(this,{day:this.d.getDate(),month:this.d.getMonth(),year:this.d.getFullYear()}))}this.d.setDate(this.d.getDate()+1)}if(!available){this.limit.right=true}},renderYear:function(){var month=this.today.getMonth();var thisyear=this.d.getFullYear()==this.today.getFullYear();var selectedyear=this.d.getFullYear()==this.choice.year;this.picker.getElement(".titleText").set("text",this.d.getFullYear());this.d.setMonth(0);var i,e;var available=false;var container=new Element("div",{"class":"months"}).inject(this.newContents);for(i=0;i<=11;i++){e=new Element("div",{"class":"month month"+(i+1)+(i==month&&thisyear?" today":"")+(i==this.choice.month&&selectedyear?" selected":"")}).set("text",this.options.monthShort?this.options.months[i].substring(0,this.options.monthShort):this.options.months[i]).inject(container);if(this.limited("month")){e.addClass("unavailable");if(available){this.limit.right=true}else{this.limit.left=true}}else{available=true;e.addEvent("click",function(e,d){this.d.setDate(1);this.d.setMonth(d);this.mode="month";this.render("fade")}.bindWithEvent(this,i))}this.d.setMonth(i)}if(!available){this.limit.right=true}},renderDecades:function(){while(this.d.getFullYear()%this.options.yearsPerPage>0){this.d.setFullYear(this.d.getFullYear()-1)}this.picker.getElement(".titleText").set("text",this.d.getFullYear()+"-"+(this.d.getFullYear()+this.options.yearsPerPage-1));var i,y,e;var available=false;var container=new Element("div",{"class":"years"}).inject(this.newContents);if($chk(this.options.minDate)&&this.d.getFullYear()<=this.options.minDate.getFullYear()){this.limit.left=true}for(i=0;i<this.options.yearsPerPage;i++){y=this.d.getFullYear();e=new Element("div",{"class":"year year"+i+(y==this.today.getFullYear()?" today":"")+(y==this.choice.year?" selected":"")}).set("text",y).inject(container);if(this.limited("year")){e.addClass("unavailable");if(available){this.limit.right=true}else{this.limit.left=true}}else{available=true;e.addEvent("click",function(e,d){this.d.setFullYear(d);this.mode="year";this.render("fade")}.bindWithEvent(this,y))}this.d.setFullYear(this.d.getFullYear()+1)}if(!available){this.limit.right=true}if($chk(this.options.maxDate)&&this.d.getFullYear()>=this.options.maxDate.getFullYear()){this.limit.right=true}},limited:function(type){var cs=$chk(this.options.minDate);var ce=$chk(this.options.maxDate);if(!cs&&!ce){return false}switch(type){case"year":return(cs&&this.d.getFullYear()<this.options.minDate.getFullYear())||(ce&&this.d.getFullYear()>this.options.maxDate.getFullYear());case"month":var ms=(""+this.d.getFullYear()+this.leadZero(this.d.getMonth())).toInt();return cs&&ms<(""+this.options.minDate.getFullYear()+this.leadZero(this.options.minDate.getMonth())).toInt()||ce&&ms>(""+this.options.maxDate.getFullYear()+this.leadZero(this.options.maxDate.getMonth())).toInt();case"date":return(cs&&this.d<this.options.minDate)||(ce&&this.d>this.options.maxDate)}},allowZoomOut:function(){if(this.mode=="time"&&this.options.timePickerOnly){return false}if(this.mode=="decades"){return false}if(this.mode=="year"&&!this.options.yearPicker){return false}return true},zoomOut:function(){if(!this.allowZoomOut()){return}if(this.mode=="year"){this.mode="decades"}else{if(this.mode=="time"){this.mode="month"}else{this.mode="year"}}this.render("fade")},previous:function(){if(this.mode=="decades"){this.d.setFullYear(this.d.getFullYear()-this.options.yearsPerPage)}else{if(this.mode=="year"){this.d.setFullYear(this.d.getFullYear()-1)}else{if(this.mode=="month"){this.d.setMonth(this.d.getMonth()-1)}}}this.render("left")},next:function(){if(this.mode=="decades"){this.d.setFullYear(this.d.getFullYear()+this.options.yearsPerPage)}else{if(this.mode=="year"){this.d.setFullYear(this.d.getFullYear()+1)}else{if(this.mode=="month"){this.d.setMonth(this.d.getMonth()+1)}}}this.render("right")},close:function(e,force){if(!$(this.picker)){return}var clickOutside=($chk(e)&&e.target!=this.picker&&!this.picker.hasChild(e.target)&&e.target!=this.visual);if(force||clickOutside){if(this.options.useFadeInOut){this.picker.set("tween",{duration:this.options.animationDuration/2,onComplete:this.destroy.bind(this)}).tween("opacity",1,0)}else{this.destroy()}}},destroy:function(){this.picker.destroy();this.picker=null;this.options.onClose()},select:function(values){this.choice=$merge(this.choice,values);var d=this.dateFromObject(this.choice);this.input.set("value",this.format(d,this.options.inputOutputFormat));this.visual.set("value",this.format(d,this.options.format));this.options.onSelect(d);this.close(null,true)},leadZero:function(v){return v<10?"0"+v:v},format:function(t,format){var f="";var h=t.getHours();var m=t.getMonth();for(var i=0;i<format.length;i++){switch(format.charAt(i)){case"\\":i++;f+=format.charAt(i);break;case"y":f+=(100+t.getYear()+"").substring(1);break;case"Y":f+=t.getFullYear();break;case"m":f+=this.leadZero(m+1);break;case"n":f+=(m+1);break;case"M":f+=this.options.months[m].substring(0,this.options.monthShort);break;case"F":f+=this.options.months[m];break;case"d":f+=this.leadZero(t.getDate());break;case"j":f+=t.getDate();break;case"D":f+=this.options.days[t.getDay()].substring(0,this.options.dayShort);break;case"l":f+=this.options.days[t.getDay()];break;case"G":f+=h;break;case"H":f+=this.leadZero(h);break;case"g":f+=(h%12?h%12:12);break;case"h":f+=this.leadZero(h%12?h%12:12);break;case"a":f+=(h>11?"pm":"am");break;case"A":f+=(h>11?"PM":"AM");break;case"i":f+=this.leadZero(t.getMinutes());break;case"s":f+=this.leadZero(t.getSeconds());break;case"U":f+=Math.floor(t.valueOf()/1000);break;default:f+=format.charAt(i)}}return f},unformat:function(t,format){var d=new Date();var a={};var c,m;t=t.toString();for(var i=0;i<format.length;i++){c=format.charAt(i);switch(c){case"\\":r=null;i++;break;case"y":r="[0-9]{2}";break;case"Y":r="[0-9]{4}";break;case"m":r="0[1-9]|1[012]";break;case"n":r="[1-9]|1[012]";break;case"M":r="[A-Za-z]{"+this.options.monthShort+"}";break;case"F":r="[A-Za-z]+";break;case"d":r="0[1-9]|[12][0-9]|3[01]";break;case"j":r="[1-9]|[12][0-9]|3[01]";break;case"D":r="[A-Za-z]{"+this.options.dayShort+"}";break;case"l":r="[A-Za-z]+";break;case"G":case"H":case"g":case"h":r="[0-9]{1,2}";break;case"a":r="(am|pm)";break;case"A":r="(AM|PM)";break;case"i":case"s":r="[012345][0-9]";break;case"U":r="-?[0-9]+$";break;default:r=null}if($chk(r)){m=t.match("^"+r);if($chk(m)){a[c]=m[0];t=t.substring(a[c].length)}else{if(this.options.debug){alert("Fatal Error in DatePicker\n\nUnexpected format at: '"+t+"' expected format character '"+c+"' (pattern '"+r+"')")}return d}}else{t=t.substring(1)}}for(c in a){var v=a[c];switch(c){case"y":d.setFullYear(v<30?2000+v.toInt():1900+v.toInt());break;case"Y":d.setFullYear(v);break;case"m":case"n":d.setMonth(v-1);break;case"M":v=this.options.months.filter(function(item,index){return item.substring(0,this.options.monthShort)==v}.bind(this))[0];case"F":d.setMonth(this.options.months.indexOf(v));break;case"d":case"j":d.setDate(v);break;case"G":case"H":d.setHours(v);break;case"g":case"h":if(a.a=="pm"||a.A=="PM"){d.setHours(v==12?0:v.toInt()+12)}else{d.setHours(v)}break;case"i":d.setMinutes(v);break;case"s":d.setSeconds(v);break;case"U":d=new Date(v.toInt()*1000)}}return d}});var MultipleFields=new Class({version:0.1,options:{spliter:";"},initialize:function(_object,_options){if(!_object){return}if(_object.get("data-spliter")){this.options.spliter=_object.get("data-spliter")}this.inputFields=_object;this.inputFields.each(function(elem){var template=elem.clone().erase("name").erase("id").erase("data-spliter").erase("value").addClass("template");elem.set("type","hidden");new Element("span.add_field",{text:"+"}).inject(elem,"after").addEvent("click",function(e){this.addField(elem,template)}.bind(this));elem.get("value").toString().split(this.options.spliter).each(function(data){this.addField(elem,template,data)}.bind(this))}.bind(this))},addField:function(elem,template,data){template.clone().set("value",data).addEvent("change",function(e){var values=[];e.target.getParent(".input").getElements(".template").each(function(template){if(template.value.trim()){values.push(template.value.trim())}});elem.set("value",values.join(this.options.spliter))}.bind(this)).inject(elem.getParent(".input").getElement(".add_field"),"before")}});window.addEvent("domready",function(){var ajaxNote=new Ajaxify();var lang=document.html.get("lang");if(lang==="en"){lang="en-US"}else{lang=lang+"-"+lang.toUpperCase()}Locale.use(lang);var wysiwyg=[];var setupJsForm=function(scope){scope.getElements(".wysiwyg").each(function(elem){wysiwyg.push(elem.mooEditable())});new MultipleFields(scope.getElements(".multiple_fields"));var dateFormat=Locale.get("Date.shortDate").replace(/%/g,"");var timeFormat="H:i";var dateMonths=Locale.get("Date.months");var dateDays=Locale.get("Date.days");new DatePicker(scope.getElements(".picker.datetime, .picker.timestamp"),{allowEmpty:true,inputOutputFormat:"Y-m-d H:i",months:dateMonths,days:dateDays,timePicker:true,format:dateFormat+" "+timeFormat});new DatePicker(scope.getElements(".picker.date"),{allowEmpty:true,inputOutputFormat:"Y-m-d H:i",months:dateMonths,days:dateDays,format:dateFormat});new DatePicker(scope.getElements(".picker.time"),{allowEmpty:true,inputOutputFormat:"Y-m-d H:i",months:dateMonths,days:dateDays,timePickerOnly:true,format:timeFormat})};var quickEdit=new AjaxEdit({holderParent:$("content"),onStartRequest:function(form){ajaxNote.loading()},onFormInjected:function(form){setupJsForm(form);ajaxNote.success()},onSave:function(form){ajaxNote.success()},onBeforeSubmit:function(){ajaxNote.loading();wysiwyg.each(function(elem){elem.saveContent()})}});var platforms=document.body.getElements(".platform");var main_form=document.id("main_form");if(platforms.length){var setupSortables=function(scope){new Sortables(scope.getElements(".sortable"),{handle:".handle",onStart:function(element,clone){element.addClass("dragged")},onComplete:function(element){element.removeClass("dragged");new Request({method:"get",url:this.element.getParent("tbody").get("data-sort-url")}).send({data:{order:this.serialize()}})}})};var updatePlatform=function(href,platform,callback){ajaxNote.loading();new Request.HTML({method:"get",url:href,onSuccess:function(a,b,html){platform.innerHTML=html;if(callback){callback.call()}setupSortables(platform);ajaxNote.success()}}).send()};platforms.addEvents({"click:relay(.pagination a, thead a)":function(e){e.preventDefault();updatePlatform(this.get("href"),this.getParent(".platform"))},"submit:relay(.search)":function(e){ajaxNote.loading();e.preventDefault();var parent=this.getParent(".platform");var hidden_search=e.target.getElement(".hidden_search");if(hidden_search){hidden_search.destroy()}new Request.HTML({method:"get",url:this.get("action"),onSuccess:function(a,b,html){parent.innerHTML=html;setupSortables(parent);ajaxNote.success()}}).send({data:this})},"click:relay(.quick_edit)":function(e){e.preventDefault();quickEdit.startEdit(this,this.getParent("tr"))},"click:relay(.action a)":function(e){e.target.addClass("clicked")},"ajax:complete:relay(a[data-method=delete][data-remote])":function(e){e.preventDefault();this.getParent("tr").dispose()}});quickEdit.addEvents({successAndChange:function(json){var tr=this.wrapElement;tr.getElements("td").each(function(td){var name=td.get("data-column-name");if(!name){return}var a=td.getElement("a");(a?a:td).innerHTML=json[name]||""})},successAndNext:function(json){var tr=this.wrapElement;var nextTr=tr.getNext("tr");if(nextTr){quickEdit.startEdit(nextTr.getElement("a"),nextTr)}else{var platform=tr.getParent(".platform");var loadMore=platform.getElement(".load_more");if(loadMore){trIndex=tr.getParent("tbody").getElements("tr").indexOf(tr);updatePlatform(loadMore.get("href"),platform,function(){platform.getElements("tbody tr").each(function(newTr,index){if(trIndex===index){nextTr=newTr.getNext("tr");quickEdit.startEdit(nextTr.getElement("a"),nextTr)}})})}else{nextTr=platform.getElements("tbody tr")[0];quickEdit.startEdit(nextTr.getElement("a"),nextTr)}}}});setupSortables(document.body)}else{if(main_form){setupJsForm(main_form);main_form.addEvents({"click:relay(.quick_edit)":function(e){e.preventDefault();quickEdit.startEdit(this)}});quickEdit.addEvents({successAndChange:function(json){this.wrapElement.set("text",json.to_bhf_s||"")},successAndNext:function(json){var a=this.wrapElement;var li=a.getParent("li");if(!li){this.close();return}var holder=li.getNext("li");if(!holder){holder=li.getParent("ul")}quickEdit.startEdit(holder.getElement("a"))}})}}var dbch=document.body.clientHeight;window.onresize=function(e){dbch=document.body.clientHeight};window.onscroll=function(e){var innerForm=quickEdit.holder.getElement("form");if(!innerForm){return}var scroll=document.body.scrollTop-70;if(scroll<10){scroll=10}if(scroll+innerForm.getSize().y>dbch){return}quickEdit.holder.setStyle("padding-top",scroll)};var fm=$("flash_massages");if(fm){fm.addClass("show").removeClass.delay(4000,fm,"show")}new BrowserUpdate({vs:{i:8,f:3,o:10.01,s:2,n:9}})});
|
data/public/stylesheets/bhf.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}ins{text-decoration:none}del{text-decoration:line-through}table{border-spacing:0}textarea,input,button,body{font:14px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif}a:focus{outline:1px dotted}hr{border:0 #C8C8C8 solid;border-top-width:1px;clear:both;height:0;margin-bottom:20px}h1{font-size:25px}h2{font-size:23px}h3{font-size:21px}h4{font-size:19px}h5{font-size:17px}h6{font-size:15px}ol{list-style:decimal}html{min-width:700px;height:100%;overflow-y:scroll;background:#303030 url(/images/bhf/bg.png)}body{min-width:960px;min-height:100%;box-shadow:inset 0px 0px 8px #000;-moz-box-shadow:inset 0px 0px 8px #000;-webkit-box-shadow:inset 0px 0px 8px #000;background:url(/images/bhf/small_ajax_loader.gif) no-repeat -4000px -4000px,url(/images/bhf/small_ajax_loader_h.gif) no-repeat -4000px -4000px,url(/images/bhf/ajax_loader.gif) no-repeat -4000px -4000px,url(/images/bhf/button_bg_a.png) no-repeat -4000px -4000px,url(/images/bhf/icon_edit_a.png) no-repeat -4000px -4000px,url(/images/bhf/icon_delete_a.png) no-repeat -4000px -4000px,url(/images/bhf/icon_drag_a.png) no-repeat -4000px -4000px}a{text-decoration:none;color:inherit}a:focus,a:active{outline:0}header{display:block;overflow:hidden;clear:both;padding:0 20px}header h1{float:right;height:83px;overflow:hidden}header nav{padding-top:25px}header nav li{float:left;font-weight:bold;margin-right:20px}header nav li.active a{text-shadow:#fff 0px -1px 0px;background:#d5d5d5;background:-moz-linear-gradient(top, #d5d5d5, #fff);background:-webkit-gradient(linear, left top, left bottom, from(#d5d5d5), to(#fff));box-shadow:0px 1px 4px #000;-moz-box-shadow:0px 1px 4px #000;-webkit-box-shadow:0px 1px 4px #000;color:#414756}header nav li.active a:hover{background:#fff;background:-moz-linear-gradient(top, #fff, #d5d5d5);background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#d5d5d5));border-color:#fff;text-shadow:#fff 0px 1px 0px;color:#414756;box-shadow:inset 0px 0px 3px #fff;-moz-box-shadow:inset 0px 0px 3px #fff;-webkit-box-shadow:inset 0px 0px 3px #fff}header nav li a{text-decoration:none;display:block;padding:5px 23px;border:1px solid transparent;color:#eaeaea;text-shadow:#000 0px -1px 0px}header nav li a:hover{background:#38a5e9;background:-moz-linear-gradient(top, #38a5e9, #0f8fdd);background:-webkit-gradient(linear, left top, left bottom, from(#38a5e9), to(#0f8fdd));color:#fff;border-color:#38a5e9;box-shadow:0px 1px 4px #000;-moz-box-shadow:0px 1px 4px #000;-webkit-box-shadow:0px 1px 4px #000;text-shadow:#0068b3 0px 1px 0px}header nav li a:active{background:#0f8fdd;background:-moz-linear-gradient(top, #0f8fdd, #38a5e9);background:-webkit-gradient(linear, left top, left bottom, from(#0f8fdd), to(#38a5e9));text-shadow:#0068b3 0px -1px 0px}#content{display:table;width:100%;box-sizing:border-box;margin-top:-20px;border-spacing:20px}#content h2,#content h3{text-shadow:#fff 0px 1px 0px}#content h6{color:#424242;text-shadow:#fff 0px 1px 0px}.quick_edit_holder,#main{display:table-cell;overflow:hidden;background:#eaeaea;border:3px solid #fff;box-sizing:border-box;padding:10px 20px;box-shadow:0px 1px 4px rgba(0,0,0,0.5);-moz-box-shadow:0px 1px 4px rgba(0,0,0,0.5);-webkit-box-shadow:0px 1px 4px rgba(0,0,0,0.5)}#main_form{margin-left:-20px}#content .quick_edit_holder{transition-duration:0.3s;-moz-transition-duration:0.3s;-webkit-transition-duration:0.3s;transition-delay:0.2s;-moz-transition-delay:0.2s;-webkit-transition-delay:0.2s;overflow-x:auto;position:relative;max-width:400px;width:400px;vertical-align:top}#content .quick_edit_holder form{margin-left:0;padding-bottom:10px}#content .quick_edit_holder .node,#content .quick_edit_holder .input,#content .quick_edit_holder .label{display:block}#content .quick_edit_holder .input{padding-top:0;min-height:31px}#content .quick_edit_holder textarea{width:300px;height:100px}#content .quick_edit_holder > button.save,#content .quick_edit_holder > button.save_and_next{margin-left:-6px;padding:6px 25px;font-size:13px}#content .quick_edit_holder > button.cancel,#content .quick_edit_holder > button.open{float:right}#content .quick_edit_holder > button.open{margin-right:10px}#content .quick_edit_holder > button.save{margin-right:16px}table{margin-top:20px;margin-bottom:40px;width:100%}table caption{overflow:hidden;height:28px;-moz-box-sizing:content-box;padding:10px 10px 10px 20px;background-image:url(/images/bhf/button_bg_2.png);border-radius:0px;border-top-right-radius:4px;border-top-left-radius:4px;-moz-border-radius:0px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;text-align:left;box-shadow:0px 1px 4px #ccc;-moz-box-shadow:0px 1px 4px #ccc;-webkit-box-shadow:0px 1px 4px #ccc}table caption h4,table caption .info{display:inline-block;text-shadow:#fff 0px 1px 0px;padding-bottom:20px}table caption h4{color:#3e3e3e}table caption .info{margin:0 20px 0 10px;width:290px;text-transform:uppercase;font-size:12px;color:#7f7f7f;white-space:nowrap}table caption form{display:inline-block}table caption .create{float:right}table td:first-child,table th:first-child{border-radius:0px;border-top-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius:0px;-moz-border-radius-topleft:4px;-moz-border-radius-bottomleft:4px}table td:last-child,table th:last-child{border-radius:0px;border-top-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius:0px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}table thead th{padding:4px 0;padding-left:3px;text-align:left;border-top:1px solid #c6c6c6;border-bottom:1px solid #1b1b1b;white-space:nowrap;background:#3e3e3e;text-shadow:#000 0px -1px 0px;color:#c2c2c2}table thead th.primary_key{text-transform:uppercase}table thead th.sorted{box-shadow:inset 0px -15px 50px #000;-moz-box-shadow:inset 0px -15px 50px #000;-webkit-box-shadow:inset 0px -15px 50px #000}table thead th.sorted a:after,table thead th.sorted.desc:hover a:after{content:" ▼"}table thead th.sorted:hover a:after,table thead th.sorted.desc a:after{content:" ▲"}table thead th.sorted a{color:#fff;text-shadow:#000 0px 1px 0px}table tbody td{border-top:1px solid #fff;border-bottom:1px solid #c6c6c6}table tbody td.has_many,table tbody td.has_and_belongs_to_many,table tbody td.text{max-width:200px;white-space:nowrap;overflow:hidden}table tbody td.has_many a,table tbody td.has_and_belongs_to_many a,table tbody td.text a{-webkit-mask-image:-webkit-gradient(linear, left top, right top, color-stop(55%, #000), color-stop(95%, rgba(255,255,255,0)))}table tbody td.no_entries{text-align:center;text-transform:uppercase;padding:10px 0;color:#7f7f7f}table tbody td.no_entries a{font-weight:bold;display:inline}table tbody a{display:block;padding:5px 3px}table tbody a.edit,table tbody a.delete{padding:0;margin-right:5px;display:inline-block;text-indent:-9999px;width:20px;height:20px}table tbody a.edit:active,table tbody a.delete:active{background-position:0 1px}table tbody a.edit.clicked,table tbody a.delete.clicked{background:url(/images/bhf/small_ajax_loader.gif) no-repeat center center}table tbody a.edit{background:url(/images/bhf/icon_edit.png)}table tbody a.delete{background:url(/images/bhf/icon_delete.png)}table tbody .handle{background:url(/images/bhf/icon_drag.png) no-repeat 7px 0;cursor:move;display:block}table tbody tr:hover td,table tbody tr.live_edit td{background:#38a5e9;background:-moz-linear-gradient(top, #38a5e9, #0f8fdd);background:-webkit-gradient(linear, left top, left bottom, from(#38a5e9), to(#0f8fdd));color:#fff;box-shadow:inset 0 1px 0 #0f8fdd,inset 0 2px 0 rgba(255,255,255,0.4);border-color:#eaeaea}table tbody tr:hover td .edit,table tbody tr.live_edit td .edit{background-image:url(/images/bhf/icon_edit_a.png)}table tbody tr:hover td .edit:hover,table tbody tr.live_edit td .edit:hover{background-image:url(/images/bhf/icon_edit_h.png)}table tbody tr:hover td .delete,table tbody tr.live_edit td .delete{background-image:url(/images/bhf/icon_delete_a.png)}table tbody tr:hover td .delete:hover,table tbody tr.live_edit td .delete:hover{background-image:url(/images/bhf/icon_delete_h.png)}table tbody tr:hover td .handle,table tbody tr.live_edit td .handle{background-image:url(/images/bhf/icon_drag_a.png)}table tbody tr:hover td .handle:hover,table tbody tr.live_edit td .handle:hover{background-image:url(/images/bhf/icon_drag_h.png)}table tbody tr:hover td .edit.clicked,table tbody tr:hover td .delete.clicked,table tbody tr.live_edit td .edit.clicked,table tbody tr.live_edit td .delete.clicked{background:url(/images/bhf/small_ajax_loader_h.gif) no-repeat center center}table tbody tr.live_edit td{background:#0f8fdd;background:-moz-linear-gradient(top, #0f8fdd, #38a5e9);background:-webkit-gradient(linear, left top, left bottom, from(#0f8fdd), to(#38a5e9));box-shadow:inset 0 -1px 0 #0f8fdd,inset 0 -2px 0 rgba(255,255,255,0.4)}table tbody tr.dragged td{opacity:0.4;background-color:gray}table thead th.drag{width:24px}table tfoot td{padding-top:10px;border-top:1px solid #fff}table thead .primary_key,table thead .number,table tbody .primary_key,table tbody .number{padding-right:10px;text-align:right}table thead .primary_key,table tbody .primary_key{width:30px}table thead .action,table tbody .action{width:54px}.default_input,.search input[type="text"],form .node .input input[type="password"],form .node .input input[type="text"],form .node .input .uploaded_image,form .node .input .uploaded_file,form .node .input textarea,.mooeditable-container,#wmd-button-bar,#wmd-preview,#wmd-output{border:1px solid #bbb;background:#fff;border-radius:2px;-moz-border-radius:2px;box-shadow:0px 1px 0px #fff;-moz-box-shadow:0px 1px 0px #fff;-webkit-box-shadow:0px 1px 0px #fff;padding:5px 5px 4px 5px;width:300px;line-height:10px}.default_input:focus,.search input[type="text"]:focus,form .node .input input[type="password"]:focus,form .node .input input[type="text"]:focus,form .node .input .uploaded_image:focus,form .node .input .uploaded_file:focus,form .node .input textarea:focus,.mooeditable-container:focus,#wmd-button-bar:focus,#wmd-preview:focus,#wmd-output:focus{outline:0;transition-duration:1s;-moz-transition-duration:1s;-webkit-transition-duration:1s;box-shadow:0 1px 12px #0f8fdd;-moz-box-shadow:0 1px 12px #0f8fdd;border-color:#0f8fdd}.search input[type="text"]{width:200px}form .node{display:table-row}form .node.string .input,form .node.string .label,form .node.number .input,form .node.number .label,form .node.text .input,form .node.text .label,form .node.password .input,form .node.password .label{padding-top:0}form .node.string .label label,form .node.number .label label,form .node.text .label label,form .node.password .label label{padding-top:5px}form .node .label{width:200px}form .node .label label{display:block;color:#424242;text-shadow:#fff 0px 1px 0px}form .node .label .field_with_errors{color:red}form .node.primary_key .label{text-transform:uppercase}form .node .input,form .node .label{padding-top:5px;vertical-align:top;display:table-cell}form .node .input textarea{width:500px;height:200px;line-height:20px}form .node .input textarea.wysiwyg{height:400px}form .node .input .errors{color:red}form .node .input .field_with_errors input{border-color:red}form .node .input [disabled]{background:#ccc !important}form .node .input input[type="submit"],form .node .input input[type="password"],form .node .input input[type="text"],form .node .input select,form .node .input textarea,form .node .input .uploaded_image,form .node .input .uploaded_file,form .node .input .mooeditable-container{margin-left:-6px}form .node .input input[type="file"]{margin-left:-5px}form .node .input .multiple_fields.template{display:block}form .node .input .add_field{display:block;font-size:20px;font-weight:bold;width:30px;margin-left:-8px;cursor:pointer;text-align:center}form .node .input .add_field:hover{color:#38a5e9}form .node .input .uploaded_file,form .node .input .uploaded_image{padding:2px;width:auto;max-width:400px;max-height:200px;margin-bottom:5px;display:block}form .node .input .warning{font-weight:bold}form .node .input .uploaded_file{padding:7px 5px 8px 7px;background:#999;color:#fff}form .node .input .uploaded_file:hover{background:#fff;color:#38a5e9}form .node .cancel{margin-left:20px;color:#7f7f7f}form .node .cancel:hover{color:#424242;text-decoration:underline}form .node .info{font-style:italic;font-size:12px;color:#424242;text-shadow:#fff 0px 1px 0px}form .error_explanation{margin-left:20px}form .error_explanation label{color:red;cursor:pointer;display:block}form .error_explanation label:hover{color:#f90}footer{padding-bottom:20px;text-shadow:#000 0px -1px 0px;text-align:center;color:gray;font-size:12px;line-height:20px}footer a{text-decoration:none}footer a:hover{text-decoration:underline}input[type="submit"],button,.button{cursor:pointer;display:inline-block;padding:6px 20px;border:1px solid #0f8fdd;margin:20px 0 0;background:#38a5e9;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,0.4);font-weight:bold;font-size:18px;text-decoration:none;border-radius:5px;-moz-border-radius:5px;-moz-box-shadow:0 1px 3px rgba(0,0,0,0.4),inset 0 1px rgba(255,255,255,0.5),inset 0 12px rgba(255,255,255,0.2),inset 0 10px 20px rgba(255,255,255,0.25),inset 0 -12px 25px rgba(0,0,0,0.3);box-shadow:0 1px 3px rgba(0,0,0,0.4),inset 0 1px rgba(255,255,255,0.5),inset 0 18px 5px rgba(255,255,255,0.2),inset 0 10px 10px rgba(255,255,255,0.25),inset 0 -12px 25px rgba(0,0,0,0.3);transition-duration:0.3s;-moz-transition-duration:0.3s;-webkit-transition-duration:0.3s;transition-property:background;-moz-transition-property:background;-webkit-transition-property:background}input[type="submit"]:hover,button:hover,.button:hover{background:#0f8fdd}input[type="submit"]:focus,input[type="submit"]:active,button:focus,button:active,.button:focus,.button:active{outline:0;background:#0f8fdd;text-shadow:0 -1px 1px rgba(0,0,0,0.4);box-shadow:0 -1px 3px rgba(0,0,0,0.4),inset 0 -1px rgba(255,255,255,0.5),inset 0 -18px rgba(255,255,255,0.1),inset 0 -10px 10px rgba(255,255,255,0.25),inset 0 -12px 25px rgba(0,0,0,0.3)}input[type="submit"].alt_button,.alt_button,.pagination a,.pagination a,.pagination span,.pagination span,.pagination em,.pagination em{display:inline-block;padding:12px 50px;border-radius:4px;-moz-border-radius:4px;text-decoration:none;border:1px solid gray;font-size:13px;cursor:pointer;background:#666;padding:5px 10px;box-shadow:inset 0 1px 0 rgba(170,171,170,0.7),inset 0 -10px 20px rgba(51,51,51,0.6);color:#fff;text-shadow:#444 0px -1px 0px}input[type="submit"].alt_button:hover,.alt_button:hover,.pagination a:hover,.pagination a:hover,.pagination span:hover,.pagination span:hover,.pagination em:hover,.pagination em:hover{border-color:#0f8fdd;box-shadow:inset 0 1px 0 rgba(255,255,255,0.4),inset 0 -10px 20px rgba(51,51,51,0.4);background:#38a5e9}input[type="submit"].alt_button:active,.alt_button:active,.pagination a:active,.pagination a:active,.pagination span:active,.pagination span:active,.pagination em:active,.pagination em:active{box-shadow:inset 0 -1px 0 rgba(255,255,255,0.4),inset 0 10px 20px rgba(51,51,51,0.4);text-shadow:#444 0px 1px 0px}input[type="submit"].alt_button:focus,.alt_button:focus,.pagination a:focus,.pagination a:focus,.pagination span:focus,.pagination span:focus,.pagination em:focus,.pagination em:focus{outline:0;transition-duration:1s;-moz-transition-duration:1s;-webkit-transition-duration:1s;transition-property:box-shadow;-moz-transition-property:box-shadow;-webkit-transition-property:box-shadow;box-shadow:0 1px 12px #0f8fdd}#flash_massages{display:block;padding:5px 20px;margin:-45px 0 10px 0;border:1px solid #38a5e9;background:#38a5e9;background:-moz-linear-gradient(top, #38a5e9, #0f8fdd);background:-webkit-gradient(linear, left top, left bottom, from(#38a5e9), to(#0f8fdd));color:#fff;text-shadow:#0068b3 0px 1px 0px;overflow:hidden;height:100%;transition-duration:0.6s;-moz-transition-duration:0.6s;-webkit-transition-duration:0.6s;transition-delay:0.5s;-moz-transition-delay:0.5s;-webkit-transition-delay:0.5s;opacity:0}#flash_massages.show{opacity:1;margin-top:0px}.pagination span{color:gray;cursor:default}.pagination span:hover{background:#666;border-color:#999}.pagination .page_number{background:transparent;color:#3e3e3e;border-color:#b7b7b7;text-shadow:#fff 0px 1px 0px;box-shadow:inset 0 1px 0 rgba(255,255,255,0.4),inset 0 -10px 10px rgba(51,51,51,0.1)}.pagination .page_number:hover{color:#fff;text-shadow:#999 0px 1px 0px}.pagination em{font-style:normal;font-weight:bold;cursor:default;background:#b1b1b1}.basic_info_list{font-size:20px;font-weight:bold;line-height:40px;color:#424242;text-shadow:#fff 0px 1px 0px}.basic_info_list li{padding-left:10px;border-top:1px solid #ccc;transition-duration:0.5s;-moz-transition-duration:0.5s;-webkit-transition-duration:0.5s}.basic_info_list li:first-child{border:none}.basic_info_list li:hover{transition-duration:0s;-moz-transition-duration:0s;-webkit-transition-duration:0s;color:#0f8fdd}.basic_info_list li:hover a{transition-duration:0s;-moz-transition-duration:0s;-webkit-transition-duration:0s}.basic_info_list li:hover,.basic_info_list li:hover + li{border-color:#38a5e9}.basic_info_list li a{transition-duration:0.5s;-moz-transition-duration:0.5s;-webkit-transition-duration:0.5s;display:block}@media (max-width: 800px);@media (max-width: 960px){.default_columns thead th:nth-last-child(2),.default_columns tbody td:nth-last-child(2),.default_columns thead th:nth-last-child(3),.default_columns tbody td:nth-last-child(3){display:none}}.mooeditable-container{position:relative;border:2px solid #ddd}.mooeditable-ui-toolbar{color:inherit;background-color:#eee;padding:2px}.mooeditable-ui-toolbar:after{content:".";display:block;height:0;clear:both;visibility:hidden}.mooeditable-ui-toolbar .toolbar-item,.mooeditable-ui-toolbar .toolbar-separator{display:-moz-inline-box;display:inline-block;vertical-align:middle}.mooeditable-ui-toolbar .mooeditable-ui-button{cursor:pointer;border:0;width:auto;height:auto;margin:2px;padding:2px;vertical-align:middle;color:inherit;background-color:transparent}* html .mooeditable-ui-toolbar .mooeditable-ui-button{width:24px;overflow:visible;padding:2px 4px}*:first-child + html .mooeditable-ui-toolbar .mooeditable-ui-button{min-width:24px;overflow:visible;padding:2px 4px}.mooeditable-ui-toolbar .mooeditable-ui-button.active,.mooeditable-ui-toolbar .mooeditable-ui-button.onActive{color:inherit;background-color:#ddd}.mooeditable-ui-toolbar .mooeditable-ui-button:hover,.mooeditable-ui-toolbar .mooeditable-ui-button.hover{color:inherit;background-color:#fff}.mooeditable-ui-toolbar .mooeditable-ui-button.disabled{cursor:default}.mooeditable-ui-toolbar .mooeditable-ui-button.disabled:hover{color:inherit;background-color:transparent}.mooeditable-ui-toolbar .mooeditable-ui-button .button-icon{display:-moz-inline-box;display:inline-block;width:16px;height:16px;vertical-align:middle;color:inherit;background:transparent url(/images/bhf/mooeditable-toolbarbuttons-tango.png) no-repeat 0 -8px}.mooeditable-ui-toolbar .mooeditable-ui-button .button-text{display:none;font-size:13px;vertical-align:middle}.mooeditable-ui-toolbar .mooeditable-ui-button-text .button-icon{display:none}.mooeditable-ui-toolbar .mooeditable-ui-button-text .button-text{display:inline}.mooeditable-ui-toolbar .mooeditable-ui-button-icon-text{width:auto}.mooeditable-ui-toolbar .mooeditable-ui-button-icon-text .button-text{display:inline;margin-left:4px}.mooeditable-ui-toolbar .toolbar-separator{width:1px;height:24px;margin:2px;text-indent:-999em;color:inherit;background-color:#fafafa}.mooeditable-ui-toolbar .bold-item .button-icon{background-position:0 0}.mooeditable-ui-toolbar .createlink-item .button-icon{background-position:0 -16px}.mooeditable-ui-toolbar .indent-item .button-icon{background-position:0 -32px}.mooeditable-ui-toolbar .insertorderedlist-item .button-icon{background-position:0 -48px}.mooeditable-ui-toolbar .insertunorderedlist-item .button-icon{background-position:0 -64px}.mooeditable-ui-toolbar .italic-item .button-icon{background-position:0 -80px}.mooeditable-ui-toolbar .outdent-item .button-icon{background-position:0 -96px}.mooeditable-ui-toolbar .redo-item .button-icon{background-position:0 -112px}.mooeditable-ui-toolbar .strikethrough-item .button-icon{background-position:0 -128px}.mooeditable-ui-toolbar .toggleview-item .button-icon{background-position:0 -144px}.mooeditable-ui-toolbar .underline-item .button-icon{background-position:0 -160px}.mooeditable-ui-toolbar .undo-item .button-icon{background-position:0 -176px}.mooeditable-ui-toolbar .unlink-item .button-icon{background-position:0 -192px}.mooeditable-ui-toolbar .urlimage-item .button-icon{background-position:0 -208px}.mooeditable-iframe{margin:0;padding:0;border:0;width:100%;vertical-align:top}.mooeditable-textarea{margin:0 !important;padding:0 !important;border:0 !important;width:100% !important;resize:none !important;outline:0 !important}.mooeditable-ui-dialog{color:inherit;background-color:#ddd;position:absolute;display:block;cursor:default;font-size:12px;z-index:100;width:100%}.mooeditable-ui-dialog .dialog-content{padding:4px 10px}.mooeditable-ui-dialog .dialog-content *{vertical-align:middle}.mooeditable-ui-dialog input{margin:0 8px}.mooeditable-ui-dialog input.text{width:300px}.mooeditable-ui-button-overlay{color:inherit;background-color:#ddd;font-size:12px;z-index:100;outline:0;-moz-outline:0;-webkit-outline:0}.mooeditable-ui-button-overlay .overlay-content{padding:10px}.mooeditable-container{background:#fff;border:1px solid #bbb}.mooeditable-container .toolbar-separator{background:#ccc}.mooeditable-container .mooeditable-ui-toolbar{border-radius:2px;-moz-border-radius:2px;margin-top:2px}.mooeditable-container button{background:#fff !important;padding:2px 4px 4px 4px !important;box-shadow:none}.mooeditable-container button:hover{background:#ccc !important}.datepicker{position:absolute;width:172px;padding:5px 10px;background:#e5e5e5;border:1px solid #c1c2dc;box-shadow:inset 0px 1px 0px #fff;-moz-box-shadow:inset 0px 1px 0px #fff;-webkit-box-shadow:inset 0px 1px 0px #fff;border-radius:2px;-moz-border-radius:2px;text-shadow:#fff 0px 1px 0px;color:#535b6f}.datepicker .header{position:relative;margin-bottom:5px;padding-bottom:5px;border-bottom:1px solid #c1c2dc;box-shadow:0px 1px 0px #fff;-moz-box-shadow:0px 1px 0px #fff;-webkit-box-shadow:0px 1px 0px #fff}.datepicker .header .title{padding-top:3px;text-align:center;margin:0 18px 0 18px}.datepicker .header .previous,.datepicker .header .next,.datepicker .header .closeButton{position:absolute;cursor:pointer;overflow:hidden;width:12px;top:2px;font-weight:bold}.datepicker .header .previous:hover,.datepicker .header .next:hover,.datepicker .header .closeButton:hover{color:#2f4d7b}.datepicker .header .previous{left:4px}.datepicker .header .next{right:4px}.datepicker .header .closeButton{display:none;right:0px;top:0px}.datepicker .titles{font-weight:bold;font-size:12px}.datepicker .titles .title.day{color:#535b6f}.datepicker .body{position:relative;top:0px;width:170px;height:156px;overflow:hidden}.datepicker .body > div{margin-top:2px;margin-left:2px}.datepicker .time{position:relative;width:100%;height:100%}.datepicker .time .hour,.datepicker .time .separator,.datepicker .time .minutes{color:#535b6f;background:#fff;width:50px;font-size:32px;position:absolute;top:10px;text-align:center;padding:2px}.datepicker .time .hour,.datepicker .time .minutes{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;text-shadow:#ccc 0px 1px 0px;margin-top:8px;border:none;left:15px}.datepicker .time .separator{background:transparent;border:0px;width:10px;left:76px}.datepicker .time .minutes{left:95px}.datepicker .time .ok{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;text-shadow:#ccc 0px 1px 0px;color:#535b6f;background:#fff;position:absolute;border:none;cursor:pointer;top:73px;left:15px;width:134px;padding:4px 0;font-size:16px}.datepicker .time .ok:hover,.datepicker .time .ok:focus,.datepicker .time .ok:active{background-color:#2f4d7b;color:#fff;text-shadow:#000 0px 1px 0px;box-shadow:0px 0px 1px #fff;-moz-box-shadow:0px 0px 1px #fff;-webkit-box-shadow:0px 0px 1px #fff}.datepicker .days .day{float:left;text-align:center;overflow:hidden;width:23px;margin:0 1px 1px 0;color:#262626}.datepicker .days .day0{margin-right:0}.datepicker .days .week5 .day{margin-bottom:0}.datepicker .days .week .day{cursor:pointer}.datepicker .days .week .day:hover{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;background-color:#fff;color:#2f4d7b;text-shadow:#ccc 0px 1px 0px}.datepicker .days .otherMonth{color:#aaa}.datepicker .days .selected{background-color:#2f4d7b;color:#fff;text-shadow:#000 0px 1px 0px;box-shadow:0px 0px 1px #fff;-moz-box-shadow:0px 0px 1px #fff;-webkit-box-shadow:0px 0px 1px #fff}.datepicker .months .month{float:left;cursor:pointer;text-align:center;margin-top:2px;padding-top:3px;padding-bottom:3px;width:55px;overflow:hidden;margin:0 1px 1px 0}.datepicker .months .month3,.datepicker .months .month6,.datepicker .months .month9,.datepicker .months .month12{margin-right:0}.datepicker .months .month10,.datepicker .months .month11,.datepicker .months .month12{margin-bottom:0}.datepicker .months .month:hover{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;background-color:#fff;color:#2f4d7b;text-shadow:#ccc 0px 1px 0px}.datepicker .months .selected{background-color:#2f4d7b;color:#fff;text-shadow:#000 0px 1px 0px;box-shadow:0px 0px 1px #fff;-moz-box-shadow:0px 0px 1px #fff;-webkit-box-shadow:0px 0px 1px #fff}.datepicker .years .year{float:left;cursor:pointer;text-align:center;margin-top:2px;padding-top:3px;padding-bottom:3px;width:32px;font-size:12px;overflow:hidden;margin:0 1px 1px 0}.datepicker .years .year4,.datepicker .years .year9,.datepicker .years .year14,.datepicker .years .year19{margin-right:0}.datepicker .years .year15,.datepicker .years .year16,.datepicker .years .year17,.datepicker .years .year18,.datepicker .years .year19{margin-bottom:0}.datepicker .years .year:hover{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;background-color:#fff;color:#2f4d7b;text-shadow:#ccc 0px 1px 0px}.datepicker .years .selected{background-color:#2f4d7b;color:#fff;text-shadow:#000 0px 1px 0px;box-shadow:0px 0px 1px #fff;-moz-box-shadow:0px 0px 1px #fff;-webkit-box-shadow:0px 0px 1px #fff}.datepicker .unavailable{background:none !important;color:#fbb !important;cursor:default !important}.hide{display:none !important}#ajax_holder{text-indent:-9999px;height:60px;opacity:0;width:120px;margin-left:-60px;position:absolute;top:-30px;left:50%;z-index:4000;border-radius:0px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;-moz-border-radius:0px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px;background:url(/images/bhf/ajax_loader.gif) no-repeat center 14px,-webkit-gradient(linear, left top, left bottom, from(#38a5e9), to(#0f8fdd));border:1px solid #38a5e9;box-shadow:0px 1px 4px #000;-moz-box-shadow:0px 1px 4px #000;-webkit-box-shadow:0px 1px 4px #000;transition-duration:0.6s;-moz-transition-duration:0.6s;-webkit-transition-duration:0.6s}#ajax_holder.loading{height:100px;opacity:1;top:0}#wmd-button-bar{width:100%;background:#fff;padding:0 10px 4px 0;margin:0 -6px 4px -6px}#wmd-input{height:400px;width:100%}#wmd-preview,#wmd-output{margin:0 -6px 0 -6px;background-color:#f5f5f5;padding:3px 5px;margin-bottom:10px;line-height:22px}.wmd-panel{width:700px !important}#wmd-preview a{text-decoration:underline}#wmd-output{overflow-x:scroll}#wmd-button-row{position:relative;margin-left:5px;margin-right:5px;margin-bottom:5px;margin-top:10px;padding:0px;height:20px}.wmd-spacer{width:1px;height:20px;margin-left:14px;position:absolute;background-color:silver;display:inline-block;list-style:none}.wmd-button{width:20px;height:20px;margin-left:5px;margin-right:5px;position:absolute;background-image:url(/images/bhf/wmd-buttons.png);background-repeat:no-repeat;background-position:0px 0px;display:inline-block;list-style:none}.wmd-button > a{width:20px;height:20px;margin-left:5px;margin-right:5px;position:absolute;display:inline-block}#wmd-button-bar #wmd-bold-button{left:0px;background-position:0px 0}#wmd-button-bar #wmd-italic-button{left:25px;background-position:-20px 0}#wmd-button-bar #wmd-spacer1{left:50px}#wmd-button-bar #wmd-link-button{left:75px;background-position:-40px 0}#wmd-button-bar #wmd-quote-button{left:100px;background-position:-60px 0}#wmd-button-bar #wmd-code-button{left:125px;background-position:-80px 0}#wmd-button-bar #wmd-image-button{left:150px;background-position:-100px 0}#wmd-button-bar #wmd-spacer2{left:175px}#wmd-button-bar #wmd-olist-button{left:200px;background-position:-120px 0}#wmd-button-bar #wmd-ulist-button{left:225px;background-position:-140px 0}#wmd-button-bar #wmd-heading-button{left:250px;background-position:-160px 0}#wmd-button-bar #wmd-hr-button{left:275px;background-position:-180px 0}#wmd-button-bar #wmd-spacer3{left:300px}#wmd-button-bar #wmd-undo-button{left:325px;background-position:-200px 0}#wmd-button-bar #wmd-redo-button{left:350px;background-position:-220px 0}#wmd-button-bar #wmd-help-button{right:0px;background-position:-240px 0}.wmd-prompt-background{background-color:#000}.wmd-prompt-dialog{border:1px solid #999;background-color:#f5f5f5}.wmd-prompt-dialog > div{font-size:0.8em;font-family:arial,helvetica,sans-serif}.wmd-prompt-dialog > form input[type="text"]{border:1px solid #999;color:#000}.wmd-prompt-dialog > form input[type="button"]{border:1px solid #888;font-size:0.8em;font-weight:bold}
|
1
|
+
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}ins{text-decoration:none}del{text-decoration:line-through}table{border-spacing:0}textarea,input,button,body{font:14px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif}a:focus{outline:1px dotted}hr{border:0 #C8C8C8 solid;border-top-width:1px;clear:both;height:0;margin-bottom:20px}h1{font-size:25px}h2{font-size:23px}h3{font-size:21px}h4{font-size:19px}h5{font-size:17px}h6{font-size:15px}ol{list-style:decimal}html{min-width:700px;height:100%;overflow-y:scroll;background:#303030 url(/images/bhf/bg.png)}body{min-width:960px;min-height:100%;box-shadow:inset 0px 0px 8px #000;-moz-box-shadow:inset 0px 0px 8px #000;-webkit-box-shadow:inset 0px 0px 8px #000;background:url(/images/bhf/small_ajax_loader.gif) no-repeat -4000px -4000px,url(/images/bhf/small_ajax_loader_h.gif) no-repeat -4000px -4000px,url(/images/bhf/ajax_loader.gif) no-repeat -4000px -4000px,url(/images/bhf/button_bg_a.png) no-repeat -4000px -4000px,url(/images/bhf/icon_edit_a.png) no-repeat -4000px -4000px,url(/images/bhf/icon_delete_a.png) no-repeat -4000px -4000px,url(/images/bhf/icon_drag_a.png) no-repeat -4000px -4000px}a{text-decoration:none;color:inherit}a:focus,a:active{outline:0}header{display:block;overflow:hidden;clear:both;padding:0 20px}header h1{float:right;height:83px;overflow:hidden}header nav{padding-top:25px}header nav li{float:left;font-weight:bold;margin-right:20px}header nav li.active a{text-shadow:#fff 0px -1px 0px;background:#d5d5d5;background:-moz-linear-gradient(top, #d5d5d5, #fff);background:-webkit-gradient(linear, left top, left bottom, from(#d5d5d5), to(#fff));box-shadow:0px 1px 4px #000;-moz-box-shadow:0px 1px 4px #000;-webkit-box-shadow:0px 1px 4px #000;color:#414756}header nav li.active a:hover{background:#fff;background:-moz-linear-gradient(top, #fff, #d5d5d5);background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#d5d5d5));border-color:#fff;text-shadow:#fff 0px 1px 0px;color:#414756;box-shadow:inset 0px 0px 3px #fff;-moz-box-shadow:inset 0px 0px 3px #fff;-webkit-box-shadow:inset 0px 0px 3px #fff}header nav li a{text-decoration:none;display:block;padding:5px 23px;border:1px solid transparent;color:#eaeaea;text-shadow:#000 0px -1px 0px}header nav li a:hover{background:#38a5e9;background:-moz-linear-gradient(top, #38a5e9, #0f8fdd);background:-webkit-gradient(linear, left top, left bottom, from(#38a5e9), to(#0f8fdd));color:#fff;border-color:#38a5e9;box-shadow:0px 1px 4px #000;-moz-box-shadow:0px 1px 4px #000;-webkit-box-shadow:0px 1px 4px #000;text-shadow:#0068b3 0px 1px 0px}header nav li a:active{background:#0f8fdd;background:-moz-linear-gradient(top, #0f8fdd, #38a5e9);background:-webkit-gradient(linear, left top, left bottom, from(#0f8fdd), to(#38a5e9));text-shadow:#0068b3 0px -1px 0px}#content{display:table;width:100%;box-sizing:border-box;margin-top:-20px;border-spacing:20px}#content h2,#content h3{text-shadow:#fff 0px 1px 0px}#content h6{color:#424242;text-shadow:#fff 0px 1px 0px}.quick_edit_holder,#main{display:table-cell;overflow:hidden;background:#eaeaea;border:3px solid #fff;box-sizing:border-box;padding:10px 20px;box-shadow:0px 1px 4px rgba(0,0,0,0.5);-moz-box-shadow:0px 1px 4px rgba(0,0,0,0.5);-webkit-box-shadow:0px 1px 4px rgba(0,0,0,0.5)}#main_form{margin-left:-20px}#content .quick_edit_holder{transition-duration:0.3s;-moz-transition-duration:0.3s;-webkit-transition-duration:0.3s;transition-delay:0.2s;-moz-transition-delay:0.2s;-webkit-transition-delay:0.2s;overflow-x:auto;position:relative;max-width:400px;width:400px;vertical-align:top}#content .quick_edit_holder form{margin-left:0;padding-bottom:10px}#content .quick_edit_holder .node,#content .quick_edit_holder .input,#content .quick_edit_holder .label{display:block}#content .quick_edit_holder .input{padding-top:0;min-height:31px}#content .quick_edit_holder textarea{width:300px;height:100px}#content .quick_edit_holder > button.save,#content .quick_edit_holder > button.save_and_next{margin-left:-6px;padding:6px 25px;font-size:13px}#content .quick_edit_holder > button.cancel,#content .quick_edit_holder > button.open{float:right}#content .quick_edit_holder > button.open{margin-right:10px}#content .quick_edit_holder > button.save{margin-right:16px}table{margin-top:20px;margin-bottom:40px;width:100%}table caption{overflow:hidden;height:28px;-moz-box-sizing:content-box;padding:10px 10px 10px 20px;background-image:url(/images/bhf/button_bg_2.png);border-radius:0px;border-top-right-radius:4px;border-top-left-radius:4px;-moz-border-radius:0px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;text-align:left;box-shadow:0px 1px 4px #ccc;-moz-box-shadow:0px 1px 4px #ccc;-webkit-box-shadow:0px 1px 4px #ccc}table caption h4,table caption .info{display:inline-block;text-shadow:#fff 0px 1px 0px;padding-bottom:20px}table caption h4{color:#3e3e3e}table caption .info{margin:0 20px 0 10px;width:290px;text-transform:uppercase;font-size:12px;color:#7f7f7f;white-space:nowrap}table caption form{display:inline-block}table caption .create{float:right}table td:first-child,table th:first-child{border-radius:0px;border-top-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius:0px;-moz-border-radius-topleft:4px;-moz-border-radius-bottomleft:4px}table td:last-child,table th:last-child{border-radius:0px;border-top-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius:0px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}table thead th{padding:4px 0;padding-left:3px;text-align:left;border-top:1px solid #c6c6c6;border-bottom:1px solid #1b1b1b;white-space:nowrap;background:#3e3e3e;text-shadow:#000 0px -1px 0px;color:#c2c2c2}table thead th.primary_key{text-transform:uppercase}table thead th.sorted{box-shadow:inset 0px -15px 50px #000;-moz-box-shadow:inset 0px -15px 50px #000;-webkit-box-shadow:inset 0px -15px 50px #000}table thead th.sorted a:after,table thead th.sorted.desc:hover a:after{content:" ▼"}table thead th.sorted:hover a:after,table thead th.sorted.desc a:after{content:" ▲"}table thead th.sorted a{color:#fff;text-shadow:#000 0px 1px 0px}table tbody td{border-top:1px solid #fff;border-bottom:1px solid #c6c6c6}table tbody td.has_many,table tbody td.has_and_belongs_to_many,table tbody td.text{max-width:200px;white-space:nowrap;overflow:hidden}table tbody td.has_many a,table tbody td.has_and_belongs_to_many a,table tbody td.text a{-webkit-mask-image:-webkit-gradient(linear, left top, right top, color-stop(70%, #000), color-stop(95%, rgba(255,255,255,0)))}table tbody td.no_entries{text-align:center;text-transform:uppercase;padding:10px 0;color:#7f7f7f}table tbody td.no_entries a{font-weight:bold;display:inline}table tbody a{display:block;padding:5px 3px}table tbody a.edit,table tbody a.delete{padding:0;margin-right:5px;display:inline-block;text-indent:-9999px;width:20px;height:20px}table tbody a.edit:active,table tbody a.delete:active{background-position:0 1px}table tbody a.edit.clicked,table tbody a.delete.clicked{background:url(/images/bhf/small_ajax_loader.gif) no-repeat center center}table tbody a.edit{background:url(/images/bhf/icon_edit.png)}table tbody a.delete{background:url(/images/bhf/icon_delete.png)}table tbody .handle{background:url(/images/bhf/icon_drag.png) no-repeat 7px 0;cursor:move;display:block}table tbody tr:hover td,table tbody tr.live_edit td{background:#38a5e9;background:-moz-linear-gradient(top, #38a5e9, #0f8fdd);background:-webkit-gradient(linear, left top, left bottom, from(#38a5e9), to(#0f8fdd));color:#fff;box-shadow:inset 0 1px 0 #0f8fdd,inset 0 2px 0 rgba(255,255,255,0.4);border-color:#eaeaea}table tbody tr:hover td .edit,table tbody tr.live_edit td .edit{background-image:url(/images/bhf/icon_edit_a.png)}table tbody tr:hover td .edit:hover,table tbody tr.live_edit td .edit:hover{background-image:url(/images/bhf/icon_edit_h.png)}table tbody tr:hover td .delete,table tbody tr.live_edit td .delete{background-image:url(/images/bhf/icon_delete_a.png)}table tbody tr:hover td .delete:hover,table tbody tr.live_edit td .delete:hover{background-image:url(/images/bhf/icon_delete_h.png)}table tbody tr:hover td .handle,table tbody tr.live_edit td .handle{background-image:url(/images/bhf/icon_drag_a.png)}table tbody tr:hover td .handle:hover,table tbody tr.live_edit td .handle:hover{background-image:url(/images/bhf/icon_drag_h.png)}table tbody tr:hover td .edit.clicked,table tbody tr:hover td .delete.clicked,table tbody tr.live_edit td .edit.clicked,table tbody tr.live_edit td .delete.clicked{background:url(/images/bhf/small_ajax_loader_h.gif) no-repeat center center}table tbody tr.live_edit td{background:#0f8fdd;background:-moz-linear-gradient(top, #0f8fdd, #38a5e9);background:-webkit-gradient(linear, left top, left bottom, from(#0f8fdd), to(#38a5e9));box-shadow:inset 0 -1px 0 #0f8fdd,inset 0 -2px 0 rgba(255,255,255,0.4)}table tbody tr.dragged td{opacity:0.4;background-color:gray}table thead th.drag{width:24px}table tfoot td{padding-top:10px;border-top:1px solid #fff}table thead .primary_key,table thead .number,table tbody .primary_key,table tbody .number{padding-right:10px;text-align:right}table thead .primary_key,table tbody .primary_key{width:30px}table thead .action,table tbody .action{width:54px}.default_input,.search input[type="text"],form .node .input input[type="password"],form .node .input input[type="text"],form .node .input .uploaded_image,form .node .input .uploaded_file,form .node .input textarea,.mooeditable-container,#wmd-button-bar,#wmd-preview,#wmd-output{border:1px solid #bbb;background:#fff;border-radius:2px;-moz-border-radius:2px;box-shadow:0px 1px 0px #fff;-moz-box-shadow:0px 1px 0px #fff;-webkit-box-shadow:0px 1px 0px #fff;padding:5px 5px 4px 5px;width:300px;line-height:10px}.default_input:focus,.search input[type="text"]:focus,form .node .input input[type="password"]:focus,form .node .input input[type="text"]:focus,form .node .input .uploaded_image:focus,form .node .input .uploaded_file:focus,form .node .input textarea:focus,.mooeditable-container:focus,#wmd-button-bar:focus,#wmd-preview:focus,#wmd-output:focus{outline:0;transition-duration:1s;-moz-transition-duration:1s;-webkit-transition-duration:1s;box-shadow:0 1px 12px #0f8fdd;-moz-box-shadow:0 1px 12px #0f8fdd;border-color:#0f8fdd}.search input[type="text"]{width:200px}form .node{display:table-row}form .node.string .input,form .node.string .label,form .node.number .input,form .node.number .label,form .node.text .input,form .node.text .label,form .node.password .input,form .node.password .label{padding-top:0}form .node.string .label label,form .node.number .label label,form .node.text .label label,form .node.password .label label{padding-top:5px}form .node .label{width:200px}form .node .label label{display:block;color:#424242;text-shadow:#fff 0px 1px 0px}form .node .label .field_with_errors{color:red}form .node.primary_key .label{text-transform:uppercase}form .node .input,form .node .label{padding-top:5px;vertical-align:top;display:table-cell}form .node .input textarea{width:500px;height:200px;line-height:20px}form .node .input textarea.wysiwyg{height:400px}form .node .input .errors{color:red}form .node .input .field_with_errors input{border-color:red}form .node .input [disabled]{background:#ccc !important}form .node .input input[type="submit"],form .node .input input[type="password"],form .node .input input[type="text"],form .node .input select,form .node .input textarea,form .node .input .uploaded_image,form .node .input .uploaded_file,form .node .input .mooeditable-container{margin-left:-6px}form .node .input input[type="file"]{margin-left:-5px}form .node .input select{font-size:16px}form .node .input .multiple_fields.template{display:block}form .node .input .add_field{display:block;font-size:20px;font-weight:bold;width:30px;margin-left:-8px;cursor:pointer;text-align:center}form .node .input .add_field:hover{color:#38a5e9}form .node .input .uploaded_file,form .node .input .uploaded_image{padding:2px;width:auto;max-width:400px;max-height:200px;margin-bottom:5px;display:block}form .node .input .warning{font-weight:bold}form .node .input .uploaded_file{padding:7px 5px 8px 7px;background:#999;color:#fff}form .node .input .uploaded_file:hover{background:#fff;color:#38a5e9}form .node .cancel{margin-left:20px;color:#7f7f7f}form .node .cancel:hover{color:#424242;text-decoration:underline}form .node .info{font-style:italic;font-size:12px;color:#424242;text-shadow:#fff 0px 1px 0px}form .error_explanation{margin-left:20px}form .error_explanation label{color:red;cursor:pointer;display:block}form .error_explanation label:hover{color:#f90}footer{padding-bottom:20px;text-shadow:#000 0px -1px 0px;text-align:center;color:gray;font-size:12px;line-height:20px}footer a{text-decoration:none}footer a:hover{text-decoration:underline}input[type="submit"],button,.button{cursor:pointer;display:inline-block;padding:6px 20px;border:1px solid #0f8fdd;margin:20px 0 0;background:#38a5e9;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,0.4);font-weight:bold;font-size:18px;text-decoration:none;border-radius:5px;-moz-border-radius:5px;-moz-box-shadow:0 1px 3px rgba(0,0,0,0.4),inset 0 1px rgba(255,255,255,0.5),inset 0 12px rgba(255,255,255,0.2),inset 0 10px 20px rgba(255,255,255,0.25),inset 0 -12px 25px rgba(0,0,0,0.3);box-shadow:0 1px 3px rgba(0,0,0,0.4),inset 0 1px rgba(255,255,255,0.5),inset 0 18px 5px rgba(255,255,255,0.2),inset 0 10px 10px rgba(255,255,255,0.25),inset 0 -12px 25px rgba(0,0,0,0.3);transition-duration:0.3s;-moz-transition-duration:0.3s;-webkit-transition-duration:0.3s;transition-property:background;-moz-transition-property:background;-webkit-transition-property:background}input[type="submit"]:hover,button:hover,.button:hover{background:#0f8fdd}input[type="submit"]:focus,input[type="submit"]:active,button:focus,button:active,.button:focus,.button:active{outline:0;background:#0f8fdd;text-shadow:0 -1px 1px rgba(0,0,0,0.4);box-shadow:0 -1px 3px rgba(0,0,0,0.4),inset 0 -1px rgba(255,255,255,0.5),inset 0 -18px rgba(255,255,255,0.1),inset 0 -10px 10px rgba(255,255,255,0.25),inset 0 -12px 25px rgba(0,0,0,0.3)}input[type="submit"].alt_button,.alt_button,.pagination a,.pagination a,.pagination span,.pagination span,.pagination em,.pagination em{display:inline-block;padding:12px 50px;border-radius:4px;-moz-border-radius:4px;text-decoration:none;border:1px solid gray;font-size:13px;cursor:pointer;background:#666;padding:5px 10px;box-shadow:inset 0 1px 0 rgba(170,171,170,0.7),inset 0 -10px 20px rgba(51,51,51,0.6);color:#fff;text-shadow:#444 0px -1px 0px}input[type="submit"].alt_button:hover,.alt_button:hover,.pagination a:hover,.pagination a:hover,.pagination span:hover,.pagination span:hover,.pagination em:hover,.pagination em:hover{border-color:#0f8fdd;box-shadow:inset 0 1px 0 rgba(255,255,255,0.4),inset 0 -10px 20px rgba(51,51,51,0.4);background:#38a5e9}input[type="submit"].alt_button:active,.alt_button:active,.pagination a:active,.pagination a:active,.pagination span:active,.pagination span:active,.pagination em:active,.pagination em:active{box-shadow:inset 0 -1px 0 rgba(255,255,255,0.4),inset 0 10px 20px rgba(51,51,51,0.4);text-shadow:#444 0px 1px 0px}input[type="submit"].alt_button:focus,.alt_button:focus,.pagination a:focus,.pagination a:focus,.pagination span:focus,.pagination span:focus,.pagination em:focus,.pagination em:focus{outline:0;transition-duration:1s;-moz-transition-duration:1s;-webkit-transition-duration:1s;transition-property:box-shadow;-moz-transition-property:box-shadow;-webkit-transition-property:box-shadow;box-shadow:0 1px 12px #0f8fdd}#flash_massages{display:block;padding:5px 20px;margin:-45px 0 10px 0;border:1px solid #38a5e9;background:#38a5e9;background:-moz-linear-gradient(top, #38a5e9, #0f8fdd);background:-webkit-gradient(linear, left top, left bottom, from(#38a5e9), to(#0f8fdd));color:#fff;text-shadow:#0068b3 0px 1px 0px;overflow:hidden;height:100%;transition-duration:0.6s;-moz-transition-duration:0.6s;-webkit-transition-duration:0.6s;transition-delay:0.5s;-moz-transition-delay:0.5s;-webkit-transition-delay:0.5s;opacity:0}#flash_massages.show{opacity:1;margin-top:0px}.pagination span{color:gray;cursor:default}.pagination span:hover{background:#666;border-color:#999}.pagination .page_number{background:transparent;color:#3e3e3e;border-color:#b7b7b7;text-shadow:#fff 0px 1px 0px;box-shadow:inset 0 1px 0 rgba(255,255,255,0.4),inset 0 -10px 10px rgba(51,51,51,0.1)}.pagination .page_number:hover{color:#fff;text-shadow:#999 0px 1px 0px}.pagination em{font-style:normal;font-weight:bold;cursor:default;background:#b1b1b1}.basic_info_list{font-size:20px;font-weight:bold;line-height:40px;color:#424242;text-shadow:#fff 0px 1px 0px}.basic_info_list li{padding-left:10px;border-top:1px solid #ccc;transition-duration:0.5s;-moz-transition-duration:0.5s;-webkit-transition-duration:0.5s}.basic_info_list li:first-child{border:none}.basic_info_list li:hover{transition-duration:0s;-moz-transition-duration:0s;-webkit-transition-duration:0s;color:#0f8fdd}.basic_info_list li:hover a{transition-duration:0s;-moz-transition-duration:0s;-webkit-transition-duration:0s}.basic_info_list li:hover,.basic_info_list li:hover + li{border-color:#38a5e9}.basic_info_list li a{transition-duration:0.5s;-moz-transition-duration:0.5s;-webkit-transition-duration:0.5s;display:block}@media (max-width: 800px);@media (max-width: 960px){.default_columns thead th:nth-last-child(2),.default_columns tbody td:nth-last-child(2),.default_columns thead th:nth-last-child(3),.default_columns tbody td:nth-last-child(3){display:none}}.mooeditable-container{position:relative;border:2px solid #ddd}.mooeditable-ui-toolbar{color:inherit;background-color:#eee;padding:2px}.mooeditable-ui-toolbar:after{content:".";display:block;height:0;clear:both;visibility:hidden}.mooeditable-ui-toolbar .toolbar-item,.mooeditable-ui-toolbar .toolbar-separator{display:-moz-inline-box;display:inline-block;vertical-align:middle}.mooeditable-ui-toolbar .mooeditable-ui-button{cursor:pointer;border:0;width:auto;height:auto;margin:2px;padding:2px;vertical-align:middle;color:inherit;background-color:transparent}* html .mooeditable-ui-toolbar .mooeditable-ui-button{width:24px;overflow:visible;padding:2px 4px}*:first-child + html .mooeditable-ui-toolbar .mooeditable-ui-button{min-width:24px;overflow:visible;padding:2px 4px}.mooeditable-ui-toolbar .mooeditable-ui-button.active,.mooeditable-ui-toolbar .mooeditable-ui-button.onActive{color:inherit;background-color:#ddd}.mooeditable-ui-toolbar .mooeditable-ui-button:hover,.mooeditable-ui-toolbar .mooeditable-ui-button.hover{color:inherit;background-color:#fff}.mooeditable-ui-toolbar .mooeditable-ui-button.disabled{cursor:default}.mooeditable-ui-toolbar .mooeditable-ui-button.disabled:hover{color:inherit;background-color:transparent}.mooeditable-ui-toolbar .mooeditable-ui-button .button-icon{display:-moz-inline-box;display:inline-block;width:16px;height:16px;vertical-align:middle;color:inherit;background:transparent url(/images/bhf/mooeditable-toolbarbuttons-tango.png) no-repeat 0 -8px}.mooeditable-ui-toolbar .mooeditable-ui-button .button-text{display:none;font-size:13px;vertical-align:middle}.mooeditable-ui-toolbar .mooeditable-ui-button-text .button-icon{display:none}.mooeditable-ui-toolbar .mooeditable-ui-button-text .button-text{display:inline}.mooeditable-ui-toolbar .mooeditable-ui-button-icon-text{width:auto}.mooeditable-ui-toolbar .mooeditable-ui-button-icon-text .button-text{display:inline;margin-left:4px}.mooeditable-ui-toolbar .toolbar-separator{width:1px;height:24px;margin:2px;text-indent:-999em;color:inherit;background-color:#fafafa}.mooeditable-ui-toolbar .bold-item .button-icon{background-position:0 0}.mooeditable-ui-toolbar .createlink-item .button-icon{background-position:0 -16px}.mooeditable-ui-toolbar .indent-item .button-icon{background-position:0 -32px}.mooeditable-ui-toolbar .insertorderedlist-item .button-icon{background-position:0 -48px}.mooeditable-ui-toolbar .insertunorderedlist-item .button-icon{background-position:0 -64px}.mooeditable-ui-toolbar .italic-item .button-icon{background-position:0 -80px}.mooeditable-ui-toolbar .outdent-item .button-icon{background-position:0 -96px}.mooeditable-ui-toolbar .redo-item .button-icon{background-position:0 -112px}.mooeditable-ui-toolbar .strikethrough-item .button-icon{background-position:0 -128px}.mooeditable-ui-toolbar .toggleview-item .button-icon{background-position:0 -144px}.mooeditable-ui-toolbar .underline-item .button-icon{background-position:0 -160px}.mooeditable-ui-toolbar .undo-item .button-icon{background-position:0 -176px}.mooeditable-ui-toolbar .unlink-item .button-icon{background-position:0 -192px}.mooeditable-ui-toolbar .urlimage-item .button-icon{background-position:0 -208px}.mooeditable-iframe{margin:0;padding:0;border:0;width:100%;vertical-align:top}.mooeditable-textarea{margin:0 !important;padding:0 !important;border:0 !important;width:100% !important;resize:none !important;outline:0 !important}.mooeditable-ui-dialog{color:inherit;background-color:#ddd;position:absolute;display:block;cursor:default;font-size:12px;z-index:100;width:100%}.mooeditable-ui-dialog .dialog-content{padding:4px 10px}.mooeditable-ui-dialog .dialog-content *{vertical-align:middle}.mooeditable-ui-dialog input{margin:0 8px}.mooeditable-ui-dialog input.text{width:300px}.mooeditable-ui-button-overlay{color:inherit;background-color:#ddd;font-size:12px;z-index:100;outline:0;-moz-outline:0;-webkit-outline:0}.mooeditable-ui-button-overlay .overlay-content{padding:10px}.mooeditable-container{background:#fff;border:1px solid #bbb}.mooeditable-container .toolbar-separator{background:#ccc}.mooeditable-container .mooeditable-ui-toolbar{border-radius:2px;-moz-border-radius:2px;margin-top:2px}.mooeditable-container button{background:#fff !important;padding:2px 4px 4px 4px !important;box-shadow:none}.mooeditable-container button:hover{background:#ccc !important}.datepicker{position:absolute;width:172px;padding:5px 10px;background:#e5e5e5;border:1px solid #c1c2dc;box-shadow:inset 0px 1px 0px #fff;-moz-box-shadow:inset 0px 1px 0px #fff;-webkit-box-shadow:inset 0px 1px 0px #fff;border-radius:2px;-moz-border-radius:2px;text-shadow:#fff 0px 1px 0px;color:#535b6f}.datepicker .header{position:relative;margin-bottom:5px;padding-bottom:5px;border-bottom:1px solid #c1c2dc;box-shadow:0px 1px 0px #fff;-moz-box-shadow:0px 1px 0px #fff;-webkit-box-shadow:0px 1px 0px #fff}.datepicker .header .title{padding-top:3px;text-align:center;margin:0 18px 0 18px}.datepicker .header .previous,.datepicker .header .next,.datepicker .header .closeButton{position:absolute;cursor:pointer;overflow:hidden;width:12px;top:2px;font-weight:bold}.datepicker .header .previous:hover,.datepicker .header .next:hover,.datepicker .header .closeButton:hover{color:#2f4d7b}.datepicker .header .previous{left:4px}.datepicker .header .next{right:4px}.datepicker .header .closeButton{display:none;right:0px;top:0px}.datepicker .titles{font-weight:bold;font-size:12px}.datepicker .titles .title.day{color:#535b6f}.datepicker .body{position:relative;top:0px;width:170px;height:156px;overflow:hidden}.datepicker .body > div{margin-top:2px;margin-left:2px}.datepicker .time{position:relative;width:100%;height:100%}.datepicker .time .hour,.datepicker .time .separator,.datepicker .time .minutes{color:#535b6f;background:#fff;width:50px;font-size:32px;position:absolute;top:10px;text-align:center;padding:2px}.datepicker .time .hour,.datepicker .time .minutes{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;text-shadow:#ccc 0px 1px 0px;margin-top:8px;border:none;left:15px}.datepicker .time .separator{background:transparent;border:0px;width:10px;left:76px}.datepicker .time .minutes{left:95px}.datepicker .time .ok{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;text-shadow:#ccc 0px 1px 0px;color:#535b6f;background:#fff;position:absolute;border:none;cursor:pointer;top:73px;left:15px;width:134px;padding:4px 0;font-size:16px}.datepicker .time .ok:hover,.datepicker .time .ok:focus,.datepicker .time .ok:active{background-color:#2f4d7b;color:#fff;text-shadow:#000 0px 1px 0px;box-shadow:0px 0px 1px #fff;-moz-box-shadow:0px 0px 1px #fff;-webkit-box-shadow:0px 0px 1px #fff}.datepicker .days .day{float:left;text-align:center;overflow:hidden;width:23px;margin:0 1px 1px 0;color:#262626}.datepicker .days .day0{margin-right:0}.datepicker .days .week5 .day{margin-bottom:0}.datepicker .days .week .day{cursor:pointer}.datepicker .days .week .day:hover{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;background-color:#fff;color:#2f4d7b;text-shadow:#ccc 0px 1px 0px}.datepicker .days .otherMonth{color:#aaa}.datepicker .days .selected{background-color:#2f4d7b;color:#fff;text-shadow:#000 0px 1px 0px;box-shadow:0px 0px 1px #fff;-moz-box-shadow:0px 0px 1px #fff;-webkit-box-shadow:0px 0px 1px #fff}.datepicker .months .month{float:left;cursor:pointer;text-align:center;margin-top:2px;padding-top:3px;padding-bottom:3px;width:55px;overflow:hidden;margin:0 1px 1px 0}.datepicker .months .month3,.datepicker .months .month6,.datepicker .months .month9,.datepicker .months .month12{margin-right:0}.datepicker .months .month10,.datepicker .months .month11,.datepicker .months .month12{margin-bottom:0}.datepicker .months .month:hover{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;background-color:#fff;color:#2f4d7b;text-shadow:#ccc 0px 1px 0px}.datepicker .months .selected{background-color:#2f4d7b;color:#fff;text-shadow:#000 0px 1px 0px;box-shadow:0px 0px 1px #fff;-moz-box-shadow:0px 0px 1px #fff;-webkit-box-shadow:0px 0px 1px #fff}.datepicker .years .year{float:left;cursor:pointer;text-align:center;margin-top:2px;padding-top:3px;padding-bottom:3px;width:32px;font-size:12px;overflow:hidden;margin:0 1px 1px 0}.datepicker .years .year4,.datepicker .years .year9,.datepicker .years .year14,.datepicker .years .year19{margin-right:0}.datepicker .years .year15,.datepicker .years .year16,.datepicker .years .year17,.datepicker .years .year18,.datepicker .years .year19{margin-bottom:0}.datepicker .years .year:hover{box-shadow:0px 0px 1px #2f4d7b;-moz-box-shadow:0px 0px 1px #2f4d7b;-webkit-box-shadow:0px 0px 1px #2f4d7b;background-color:#fff;color:#2f4d7b;text-shadow:#ccc 0px 1px 0px}.datepicker .years .selected{background-color:#2f4d7b;color:#fff;text-shadow:#000 0px 1px 0px;box-shadow:0px 0px 1px #fff;-moz-box-shadow:0px 0px 1px #fff;-webkit-box-shadow:0px 0px 1px #fff}.datepicker .unavailable{background:none !important;color:#fbb !important;cursor:default !important}.hide{display:none !important}#ajax_holder{text-indent:-9999px;height:60px;opacity:0;width:120px;margin-left:-60px;position:absolute;top:-30px;left:50%;z-index:4000;border-radius:0px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;-moz-border-radius:0px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px;background:url(/images/bhf/ajax_loader.gif) no-repeat center 14px,-webkit-gradient(linear, left top, left bottom, from(#38a5e9), to(#0f8fdd));border:1px solid #38a5e9;box-shadow:0px 1px 4px #000;-moz-box-shadow:0px 1px 4px #000;-webkit-box-shadow:0px 1px 4px #000;transition-duration:0.6s;-moz-transition-duration:0.6s;-webkit-transition-duration:0.6s}#ajax_holder.loading{height:100px;opacity:1;top:0}#wmd-button-bar{width:100%;background:#fff;padding:0 10px 4px 0;margin:0 -6px 4px -6px}#wmd-input{height:400px;width:100%}#wmd-preview,#wmd-output{margin:0 -6px 0 -6px;background-color:#f5f5f5;padding:3px 5px;margin-bottom:10px;line-height:22px}.wmd-panel{width:700px !important}#wmd-preview img{display:block}#wmd-preview ul,#wmd-preview ol{padding-left:30px}#wmd-preview ul,#wmd-preview ol,#wmd-preview h1,#wmd-preview h2,#wmd-preview h3,#wmd-preview h4,#wmd-preview h5,#wmd-preview h6,#wmd-preview p{padding-bottom:10px}#wmd-preview a{text-decoration:underline;color:#0f8fdd;font-weight:bold}.preview_switch span{float:right;margin-left:10px;cursor:pointer}.preview_switch span.active{color:#0f8fdd}#wmd-output{overflow-x:scroll;font-family:Monaco,Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Courier New",Courier,monospace;font-size:12px;line-height:16px;background:#424242;color:#f1f1f1}#wmd-button-row{position:relative;margin-left:5px;margin-right:5px;margin-bottom:5px;margin-top:10px;padding:0px;height:20px}.wmd-spacer{width:1px;height:20px;margin-left:14px;position:absolute;background-color:silver;display:inline-block;list-style:none}.wmd-button{width:20px;height:20px;margin-left:5px;margin-right:5px;position:absolute;background-image:url(/images/bhf/wmd-buttons.png);background-repeat:no-repeat;background-position:0px 0px;display:inline-block;list-style:none}.wmd-button > a{width:20px;height:20px;margin-left:5px;margin-right:5px;position:absolute;display:inline-block}#wmd-button-bar #wmd-bold-button{left:0px;background-position:0px 0}#wmd-button-bar #wmd-italic-button{left:25px;background-position:-20px 0}#wmd-button-bar #wmd-spacer1{left:50px}#wmd-button-bar #wmd-link-button{left:75px;background-position:-40px 0}#wmd-button-bar #wmd-quote-button{left:100px;background-position:-60px 0}#wmd-button-bar #wmd-code-button{left:125px;background-position:-80px 0}#wmd-button-bar #wmd-image-button{left:150px;background-position:-100px 0}#wmd-button-bar #wmd-spacer2{left:175px}#wmd-button-bar #wmd-olist-button{left:200px;background-position:-120px 0}#wmd-button-bar #wmd-ulist-button{left:225px;background-position:-140px 0}#wmd-button-bar #wmd-heading-button{left:250px;background-position:-160px 0}#wmd-button-bar #wmd-hr-button{left:275px;background-position:-180px 0}#wmd-button-bar #wmd-spacer3{left:300px}#wmd-button-bar #wmd-undo-button{left:325px;background-position:-200px 0}#wmd-button-bar #wmd-redo-button{left:350px;background-position:-220px 0}#wmd-button-bar #wmd-help-button{right:0px;background-position:-240px 0}.wmd-prompt-background{background-color:#000}.wmd-prompt-dialog{border:1px solid #999;background-color:#f5f5f5}.wmd-prompt-dialog > div{font-size:0.8em;font-family:arial,helvetica,sans-serif}.wmd-prompt-dialog > form input[type="text"]{border:1px solid #999;color:#000}.wmd-prompt-dialog > form input[type="button"]{border:1px solid #888;font-size:0.8em;font-weight:bold}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bhf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 8
|
10
|
+
version: 0.3.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Anton Pawlik
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-31 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|