Browse Source

HUE-157. Converting Beeswax JFrame filters to Behavior Filters

Marcus McLaughlin 15 years ago
parent
commit
c6d608cea3

+ 1 - 1
apps/beeswax/src/beeswax/templates/choose_delimiter.mako

@@ -18,7 +18,7 @@
 <%namespace name="util" file="util.mako" />
 ${wrappers.head('Choose a Delimiter')}
 <div class="toolbar">
-  <ul class="ccs-breadcrumb clearfix">
+  <ul data-filters="Breadcrumb" class="clearfix">
     ## TODO(marcus) These links should be part of the form, and do POST
     <li><a href="${ url('beeswax.create_table.import_wizard') }">Choose File</a></li>
     <li class="tabSelected"><a href="${ url('beeswax.create_table.import_wizard') }">Choose Delimiter</a></li>

+ 1 - 1
apps/beeswax/src/beeswax/templates/choose_file.mako

@@ -17,7 +17,7 @@
 <%namespace name="comps" file="beeswax_components.mako" />
 ${wrappers.head('Choose a File')}
 <div class="toolbar">
-  <ul class="ccs-breadcrumb clearfix">
+  <ul class="clearfix" data-filters="Breadcrumb">
     <li class="tabSelected"><a href="${ url('beeswax.create_table.import_wizard') }">Choose File</a></li>
     <li><a>Choose Delimiter</a></li>
     <li><a>Define Columns</a></li>

+ 3 - 3
apps/beeswax/src/beeswax/templates/create_table_manually.mako

@@ -17,7 +17,7 @@
 <%namespace name="wrappers" file="header_footer.mako" />
 ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
 <div class="toolbar">
-  <ul class="ccs-bc-form ccs-breadcrumb clearfix" data-bc-sections=".ccs-bc-section" data-bc-form="form">
+  <ul class="clearfix" data-filters="Breadcrumb, BreadcrumbForm" data-bc-sections=".ccs-bc-section" data-bc-form="form">
     <li><a href="#step1">Name</a></li>
     <li><a href="#step2">Record Format</a></li>
     <li><a href="#step3">Serialization</a></li>
@@ -71,7 +71,7 @@ ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
             <% 
               selected = table_form["row_format"].data or table_form["row_format"].field.initial
             %>
-            <dt class="bw-format-delimited relays" data-group-toggle="{'group': '.bw-config-data li', 'show':'.bw-delim-options'}">
+            <dt class="bw-format-delimited relays" data-filters="DataGroupToggle" data-group-toggle="{'group': '.bw-config-data li', 'show':'.bw-delim-options'}">
               <label>
                 Delimited
                 <input type="radio" name="table-row_format" value="Delimited" class="validate-one-required:'.bw-format'" title="Please choose one of these record formats." data-error-container=''
@@ -83,7 +83,7 @@ ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
               <div class="ccs-errors"></div>
             </dt>
             <dd>Data files use delimiters, like commas (CSV) or tabs.</dd>
-            <dt class="bw-format-SerDe relays" data-group-toggle="{'group': '.bw-config-data li', 'show':'.bw-serde-options'}">
+            <dt class="bw-format-SerDe relays" data-filters="DataGroupToggle" data-group-toggle="{'group': '.bw-config-data li', 'show':'.bw-serde-options'}">
               <label>
                 SerDe
                 <input type="radio" name="table-row_format" value="SerDe"

+ 1 - 1
apps/beeswax/src/beeswax/templates/define_columns.mako

@@ -18,7 +18,7 @@
 <%namespace name="util" file="util.mako" />
 ${wrappers.head('Define Columns')}
 <div class="toolbar">
-  <ul class="ccs-breadcrumb clearfix">
+  <ul class="clearfix" data-filters="Breadcrumb">
     ## TODO(marcus) These links should be part of the form, and do POST
     <li><a href="${ url('beeswax.create_table.import_wizard') }">Choose File</a></li>
     <li><a href="${ url('beeswax.create_table.import_wizard') }">Choose Delimiter</a></li>

+ 1 - 1
apps/beeswax/src/beeswax/templates/execute.mako

@@ -55,7 +55,7 @@
       </ul>
     </dt>
     <dd class="bw-query_bottom default" style="height: auto;">
-      <textarea class="bw-query-field ccs-simple-posteditor" data-filters="OverText"
+      <textarea class="bw-query-field" data-filters="OverText, PostEditor"
         alt="Example: SELECT * FROM tablename" name="${form.query["query"].html_name | n}">${extract_field_data(form.query["query"]) or ''}</textarea>
         % if len(form.query["query"].errors):
           <div class="validation-advice">

+ 1 - 1
apps/beeswax/src/beeswax/templates/watch_results.mako

@@ -31,7 +31,7 @@ ${wrappers.head("Beeswax: Query Results", section='query')}
                 <li><a target="_blank" href="${download_urls["csv"]}" class="bw-download_csv">Download as CSV</a>
                 <li><a target="_blank" href="${download_urls["xls"]}" class="bw-download_xls">Download as XLS</a>
                 <li data-filters="CollapsingElements"><a class="bw-save collapser jframe_ignore" href="${url('beeswax.views.save_results', query.id)}">Save</a>
-                  <div class="collapsible accordion ccs-hidden bw-save_query_results" style="display:none"> 
+                  <div class="collapsible ccs-hidden bw-save_query_results" style="display:none" data-filters="Accordion"> 
                     <form action="${url('beeswax.views.save_results', query.id) }" method="POST">
                       ## Writing the save_target fields myself so I can match them to their respective text input fields.
                       <div> 

+ 8 - 8
apps/beeswax/static/css/beeswax.css

@@ -119,14 +119,14 @@ div.beeswax div.bw-welcome a.bw-load-sample-button {
 }
 
 /* breadcrumb */
-div.beeswax ul.ccs-breadcrumb {
+div.beeswax ul[data-filters*=Breadcrumb] {
 	position: absolute;
 	top: 57px;
 	left: 80px;
 	margin: 0 auto;
 	z-index: 0;
 }
-div.beeswax ul.ccs-breadcrumb li {
+div.beeswax ul[data-filters*=Breadcrumb] li {
 	float: left;
 	height: 23px;
 	background: url(../art/breadcrumb.png) top right;
@@ -134,25 +134,25 @@ div.beeswax ul.ccs-breadcrumb li {
 	margin-left: -16px;
 	padding-left: 12px;
 }
-div.beeswax ul.ccs-breadcrumb li.tabSelected {
+div.beeswax ul[data-filters*=Breadcrumb] li.tabSelected {
 	background: url(../art/breadcrumb.png) right -23px;
 }
-div.beeswax ul.ccs-breadcrumb li.ccs-bc-error {
+div.beeswax ul[data-filters*=Breadcrumb] li.ccs-bc-error {
 	background: url(../art/breadcrumb.png) right 23px;
 }
-div.beeswax ul.ccs-breadcrumb li:first-child {
+div.beeswax ul[data-filters*=Breadcrumb] li:first-child {
 	margin-left: 0px;
 	border-radius: 4px;
 	-moz-border-radius: 4px;
 	-webkit-border-radius: 4px;
 }
-div.beeswax ul.ccs-breadcrumb li a {
+div.beeswax ul[data-filters*=Breadcrumb] li a {
 	line-height: 23px;
 	color: #000;
 	padding: 0px 16px 0px 8px;
 	text-shadow: 0px 1px #ccc;
 }
-div.beeswax ul.ccs-breadcrumb li a:hover {
+div.beeswax ul[data-filters*=Breadcrumb] li a:hover {
 	text-decoration: none;
 }
 
@@ -797,7 +797,7 @@ div.beeswax .bw-save_query_results input[type=radio] {
 	float: left;
 	clear: both;
 }
-div.beeswax .watch_results .bw-save_query_results .accordion .target {
+div.beeswax .watch_results .bw-save_query_results [data-filters*=Accordion] .target {
 	clear: both;
 }
 div.beeswax .watch_results .bw-save_query_results {

+ 84 - 151
apps/beeswax/static/js/Source/Beeswax/CCS.Beeswax.js

@@ -17,7 +17,7 @@
 ---
 description: Beeswax (the Hive UI)
 provides: [CCS.Beeswax]
-requires: [ccs-shared/CCS.JBrowser, clientcide/TabSwapper, More/Form.Validator.Inline, More/Fx.Accordion, ccs-shared/DynamicTextarea, ccs-shared/CCS.PostEditor.Simple, ccs-shared/CCS.JFrame.Chooser]
+requires: [ccs-shared/CCS.JBrowser, clientcide/TabSwapper, More/Form.Validator.Inline, ccs-shared/DynamicTextarea, ccs-shared/CCS.JFrame.Chooser]
 script: CCS.Beeswax.js
 
 ...
@@ -63,158 +63,91 @@ ART.Sheet.define('splitview.bw-editor', {
 					description: 'Open the selected item.'
 				}
 			});
-			
-			//linkers for beewswax
-			this.jframe.addLinkers({
-				//toggles the display of a group of elements when another is clicked
-				'[data-group-toggle]': function(event, el) {
-					/*
-						get the json data for the toggle
-						looks like:
-						{
-							'group': '.bw-config-data li', //the elements in the group
-							'show':'.bw-serde-options' //the element that you show when you click; all others in the group get hidden
-						}
-						
-						See Also: the Collapsible JFrame pattern, which I need to update to work similar to this.
-						The main diff being that this is about toggling a group; one shows while the others hide.
-					*/
-					var toggles = JSON.decode(el.get('data-group-toggle'));
-					var sections = $(this).getElements(toggles.group);
-					var show = $(this).getElements(toggles.show);
-					sections.each(function(section) {
-						section.setStyle('display', show.contains(section) ? 'block' : 'none');
-					});
-				}
-			});
-			this.jframe.addFilters({
-				// breadcrumb pattern; has to set z-index programatically for layout
-				breadcrumb: function(container){
-					if (!container.get('html').contains('ccs-breadcrumb')) return;
-					container.getElements('.ccs-breadcrumb').each(function(bc) {
-						var items = bc.getElements('li');
-						items.reverse().each(function(item, i){
-							item.setStyle('z-index', i+1);
-						});
-					});
-				},
+                        this.jframe.addBehaviors({
+                                // breadcrumb pattern; has to set z-index programatically for layout
+                                'Breadcrumb': function(element, methods) {
+                                        var items = element.getElements('li');
+                                        items.reverse().each(function(item, i){
+                                                item.setStyle('z-index', i+1);
+                                        });
+                                },
 				//breadcrumb form; displays a breadcrumb that grows as you fill out the form
-				breadcrumb_form: function(container){
-					if (!container.get('html').contains('ccs-bc-form')) return;
-					/*
-						.ccs-bc-form is a UL with LI items for each breadcrumb; looks like this:
-						<ul class="ccs-bc-form ccs-breadcrumb clearfix" data-bc-sections=".ccs-bc-section" data-bc-form="form">
-							<li><a href="#step1">One</a></li>
-							<li><a href="#step2">Two</a></li>
-							<li><a href="#step3">Ect</a></li>
-						</ul>
-						
-						it has a data-bc-sections definition which is a selector to select the sections that correlate to the bc links
-						it has a data-bc-form selector that correlates to the form for this bc form.
-					*/
-					container.getElements('.ccs-bc-form').each(function(bc){
-						var items = bc.getElements('li');
-						var form = container.getElement(bc.get('data-bc-form')) || container.getElement('form');
-						var sections = container.getElements(bc.get('data-bc-sections'));
-						//extend tab swapper; we need to manage things like OverText and FormValidator when we change sections
-						var TS = new Class({
-							Extends: TabSwapper,
-							showSection: function(index) {
-								//we validate the form when the user pages forward and not on the first display when this.now is still undefined
-								//(where this.now is the current index of the TabSwapper; it's undefined on init)
-								var validate = index > this.now && this.now != undefined;
-								if (!validate) {
-									//reset the error state
-									form.get('validator').reset();
-									if (this.now != undefined) items[this.now].removeClass('ccs-bc-error');
-								}
-								if (!validate || getValidator(form).validate()) {
-									//show the section if we're valid
-									this.parent(index);
-									//show the overtext that might have been hidden
-									OverText.update();
-								}
-								return this;
-							}
-						});
+                                'BreadcrumbForm': function(element, methods) {
+                                /*
+                                        The element is a UL with LI items for each breadcrumb; looks like this:
+                                        <ul data-filters="Breadcrumb, BreadcrumbForm" class="clearfix" data-bc-sections=".ccs-bc-section" data-bc-form="form">
+                                                <li><a href="#step1">One</a></li>
+                                                <li><a href="#step2">Two</a></li>
+                                                <li><a href="#step3">Ect</a></li>
+                                        </ul>
+                                        
+                                        it has a data-bc-sections definition which is a selector to select the sections that correlate to the bc links
+                                        it has a data-bc-form selector that correlates to the form for this bc form.
+                                */
+                                        container = methods.getContentElement();
+                                        var items = element.getElements('li');
+                                        var form = container.getElement(element.get('data', 'bc-form')) || container.getElement('form');
+                                        var sections = container.getElements(element.get('data', 'bc-sections'));
+                                        //extend tab swapper; we need to manage things like OverText and FormValidator when we change sections
+                                        var TS = new Class({
+                                                Extends: TabSwapper,
+                                                showSection: function(index) {
+                                                        //we validate the form when the user pages forward and not on the first display when this.now is still undefined
+                                                        //(where this.now is the current index of the TabSwapper; it's undefined on init)
+                                                        var validate = index > this.now && this.now != undefined;
+                                                        if (!validate) {
+                                                                //reset the error state
+                                                                form.get('validator').reset();
+                                                                if (this.now != undefined) items[this.now].removeClass('ccs-bc-error');
+                                                        }
+                                                        if (!validate || getValidator(form).validate()) {
+                                                                //show the section if we're valid
+                                                                this.parent(index);
+                                                                //show the overtext that might have been hidden
+                                                                OverText.update();
+                                                        }
+                                                        return this;
+                                                }
+                                        });
 
-						//get the form validator and add an event for when elements are validated
-						//if the element fails, get the nav item and breadcrumb section and add an error class for styling
-						getValidator(form).addEvents({
-							elementValidate: function(valid, field){
-								var section = field.getParent(bc.get('data-bc-sections'));
-								var nav = items[sections.indexOf(section)];
-								if (valid) nav.removeClass('ccs-bc-error');
-								else nav.addClass('ccs-bc-error');
-							}
-						});
+                                        //get the form validator and add an event for when elements are validated
+                                        //if the element fails, get the nav item and breadcrumb section and add an error class for styling
+                                        getValidator(form).addEvents({
+                                                elementValidate: function(valid, field){
+                                                        var section = field.getParent(element.get('data', 'bc-sections'));
+                                                        var nav = items[sections.indexOf(section)];
+                                                        if (valid) nav.removeClass('ccs-bc-error');
+                                                        else nav.addClass('ccs-bc-error');
+                                                }
+                                        });
 
-						//create our modified tabswapper
-						var tabs = new TS({
-							tabs: items,
-							sections: sections,
-							smooth: true
-						});
-						//find any sections with an element with the class .ccs-multipart-next and make that
-						//next button change tabs; note that this is the only way the user can progress forward (for now)
-						//todo: add some keyboard love; enter, tab, arrows, etc.
-						sections.each(function(section, i) {
-							section.getElements('.ccs-multipart-next').addEvent('click', function(e){
-								e.stop();
-								if (getValidator(form).validate()) tabs.show(i+1);
-							});
-						});
-					});
-				},
-				//displays an input field when the user choose "other" in a select input.
-				//
-				// Note that this overwrites the default JFrameFilter because it has extra
-				// validation logic.
-				select_with_other: function(container) {
-					if (!container.get('html').contains('ccs-select-with-other')) return;
-					container.getElements('.ccs-select-with-other').each(function(el) {
-						//get the 'other' input
-						var other = el.getElement('input').set('alt', 'Enter a custom value').addClass('required').addDataFilter('OverText');
-						//create hint text
-						var ot = new OverText(other);
-						//get the select input
-						var sel = el.getElement('select');
-						//when the select changes, if the user chooses "other"
-						//reveal the input, enable the overtext, and enforce validation
-						sel.addEvent('change', function() {
-							if (sel.getSelected()[0].get('value') == '__other__') {
-								other.removeClass('ignoreValidation').reveal().get('reveal').chain(function(){
-									ot.enable();
-								});
-							//else hide and disable the input
-							} else {
-								ot.disable();
-								other.dissolve().addClass('ignoreValidation');
-								getValidator(el.getParent('form')).validate();
-							}
-						});
-					});
-				},
-				dynamic_textarea: function(container) {
-					if (!container.get('html').contains('ccs-dynamic-textarea')) return;
-					container.getElements('.ccs-dynamic-textarea').each(function(el){
-						new DynamicTextarea(el, {
-							minRows: 5
-						});
-					});
-				},
-				posteditor: function(container){
-					if (!container.get('html').contains('ccs-simple-posteditor')) return;
-					container.getElements('textarea.ccs-simple-posteditor, .ccs-simple-posteditor textarea').each(function(input) {
-						new CCS.PostEditor.Simple(input);
-					});
-				},
-				accordion: function(container){
-					if (!container.get('html').contains('accordion')) return;
-					container.getElements('.accordion').each(function(accordion) {
-						new Fx.Accordion(accordion.getElements('.toggle'), accordion.getElements('.target'));
-					});
-				},
+                                        //create our modified tabswapper
+                                        var tabs = new TS({
+                                                tabs: items,
+                                                sections: sections,
+                                                smooth: true
+                                        });
+                                        //find any sections with an element with the class .ccs-multipart-next and make that
+                                        //next button change tabs; note that this is the only way the user can progress forward (for now)
+                                        //todo: add some keyboard love; enter, tab, arrows, etc.
+                                        sections.each(function(section, i) {
+                                                section.getElements('.ccs-multipart-next').addEvent('click', function(e){
+                                                        e.stop();
+                                                        if (getValidator(form).validate()) tabs.show(i+1);
+                                                });
+                                        });
+                                }
+                        });
+                        this.jframe.addBehaviorPlugin('SelectWithOther', 'SelectWithOtherValidation', function(element, methods) {
+                                //adds validation upon hiding the 'other' field
+                                var select = element.getElement('select');
+                                select.addEvent('change', function() {
+                                        if(!select.getSelected()[0].get('value') == '__other__') {
+                                                getValidator(element.getParent('form')).validate();
+                                        }
+                                });
+                        });
+			this.jframe.addFilters({
 				visible: function(container){
 					if(!container.get('html').contains('ccs-visible')) return;
 					container.getElements('.ccs-visible').setStyle("display", "");
@@ -330,7 +263,7 @@ ART.Sheet.define('splitview.bw-editor', {
 				checkFormSectionInput(input);
 				//if the input is checked, we have to invoke the data-group-toggle manually
 				//otherwise the next slide shows both the delimited and serde options
-				if (input.get('checked')) this.jframe.invokeLinker('[data-group-toggle]', input.getParent('[data-group-toggle]'));
+				if (input.get('checked')) input.getParent('[data-group-toggle]').fireEvent('click');
 			}, this);
 
 			/* file formats */

+ 0 - 7
apps/filebrowser/src/filebrowser/static/js/Source/FileBrowser/CCS.FileEditor.js

@@ -46,13 +46,6 @@ CCS.FileEditor = new Class({
 
 	initialize: function (path, options) {
 		this.parent(path || '/filebrowser/', options);
-                this.jframe.addBehaviors({
-                        'FE-PostEditor': function(element, methods) {
-                                var textarea = element.getElement('textarea');
-                                if(!textarea) return;
-                                var postEditor = new CCS.PostEditor.Simple(textarea); 
-                        }
-                });
 		this.jframe.addRenderers({
 			'saveAsPrompt_popup': function (content) {
 				var saveAs = content.elements.filter('.saveAsPrompt_popup')[0];

+ 2 - 2
apps/filebrowser/src/filebrowser/templates/edit.mako

@@ -44,8 +44,8 @@
     ${edit.render_field(form["path"], hidden=True, notitle=True)}
     ${edit.render_field(form["encoding"], hidden=True, notitle=True)}
     <h2 class="ccs-hidden">${form["contents"].label_tag() | n}</h2>
-    <div class="fe-divResize" data-filters="SizeTo, FE-PostEditor">${edit.render_field(form["contents"], tag="textarea", notitle=True, attrs=dict(
-      data_filters="SizeTo",
+    <div class="fe-divResize" data-filters="SizeTo">${edit.render_field(form["contents"], tag="textarea", notitle=True, attrs=dict(
+      data_filters="SizeTo, PostEditor",
       data_size_to_width="-20")) | n}</div>
     <input class="ccs-hidden" type="submit" name="save" value="saveAs">
     <input class="ccs-hidden" type="submit" name="save" value="save">

+ 36 - 0
apps/jframegallery/src/jframegallery/templates/accordion.html

@@ -0,0 +1,36 @@
+{% comment %}
+Licensed to Cloudera, Inc. under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  Cloudera, Inc. licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+	<head>
+		<title>Accordion</title>
+	</head>
+	<body>
+          <p> Below is an accordion, only one of the target areas should be visible at a time, dependent on which toggle was clicked last. </p>
+          <div data-filters="Accordion">
+            <ul>
+              <li class="toggle">Toggle 1</li>
+              <li class="toggle">Toggle 2</li>
+              <li class="toggle">Toggle 3</li>
+            </ul>
+            <div class="target">This area is controlled by Toggle 1.</div>
+            <div class="target">This area is controlled by Toggle 2.</div>
+            <div class="target">This area is controlled by Toggle 3.</div>
+          </div>
+        </body>
+        </html>

+ 28 - 0
apps/jframegallery/src/jframegallery/templates/posteditor.html

@@ -0,0 +1,28 @@
+{% comment %}
+Licensed to Cloudera, Inc. under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  Cloudera, Inc. licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+	<head>
+		<title>PostEditor</title>
+	</head>
+	<body>
+	<h1>PostEditor</h1>
+        Below is a PostEditor.  It gives you some useful editing features, such as bracket matching.
+	<textarea name="postedit" data-filters="PostEditor">  If you type a brakcket here, the left bracket will be created for you. </textarea>
+        </body>
+</html>

+ 30 - 0
desktop/core/static/js/Source/BehaviorFilters/Behavior.PostEditor.js

@@ -0,0 +1,30 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+/*
+---
+description: Creates a SimplePostEditor of any textarea with PostEditor in its data-filters property. 
+provides: [Behavior.PostEditor]
+requires: [Widgets/Behavior, /CCS.PostEditor.Simple]
+script: Behavior.PostEditor.js
+...
+*/
+
+Behavior.addGlobalFilters({
+        PostEditor: function(element, methods) {
+                var postEditor = new CCS.PostEditor.Simple(element);
+        }
+});
+

+ 2 - 3
desktop/core/static/js/Source/BehaviorFilters/Behavior.SelectWithOther.js

@@ -39,9 +39,8 @@ Behavior.addGlobalFilters({
                                 });
                         //else hide and disable the input
                         } else {
-                                other.addClass('ignoreValidation').dissolve().get('reveal').chain(function(){
-                                        ot.disable();
-                                });
+                                ot.disable();
+                                other.addClass('ignoreValidation').dissolve();
                         }
                 });
                 this.markForCleanup(element, function(){

+ 22 - 0
desktop/core/static/js/Source/CCS/CCS.JFrame.js

@@ -31,6 +31,7 @@ requires:
  - More/HtmlTable.Select
  - More/Spinner
  - Widgets/Behavior
+ - Widgets/Behavior.Accordion
  - Widgets/Behavior.ArtButton
  - Widgets/Behavior.ArtInput
  - Widgets/Behavior.FormRequest
@@ -47,6 +48,7 @@ requires:
  - /Behavior.HtmlTableKeyboard
  - /Behavior.HtmlTableMultiSelectMenu
  - /Behavior.MultiChecks
+ - /Behavior.PostEditor
  - /Behavior.SelectWithOther
  - /Behavior.SideBySideSelect
  - /Behavior.SizeTo
@@ -456,6 +458,26 @@ CCS.JFrame = new Class({
 	addBehaviors: function(obj, overwrite){
 		this.behavior.addFilters(obj, overwrite);
 	},
+        /* 
+                add a new behavior plugin
+                filterName - (*string*) the name of the filter this plugin is for (no spaces or commas; preferably CamelCase)
+                name - (*string*) the name of the plugin (no spaces or commas; preferably CamelCase)
+                fn - (*string*) the attachment function for the plugin
+                overwrite - (*boolean*) if true, will overwite any pre-existing filter if one is present
+        */
+
+        addBehaviorPlugin: function(filterName, name, fn, overwrite) {
+                this.behavior.addPlugin(filterName, name, fn, overwrite);
+        },
+        /*
+                add a group of behavior plugins
+                obj - (*object*) an object containing objects containing the filter name, the plugin name, and the attachment function for the plugin
+                overwrite - (*boolean*) if true, will overwrite any pre-existing filter if one is present
+        */
+
+        addBehaviorPlugins: function(obj, overwrite){
+                this.behavior.addPlugins(obj, overwrite);
+        },
 
 	/*
 		apply a specific behavior to an element

+ 1 - 0
desktop/core/static/js/package.yml

@@ -56,6 +56,7 @@ sources: [
   Source/BehaviorFilters/Behavior.HtmlTableKeyboard.js,
   Source/BehaviorFilters/Behavior.HtmlTableMultiSelectMenu.js,
   Source/BehaviorFilters/Behavior.MultiChecks.js,
+  Source/BehaviorFilters/Behavior.PostEditor.js,
   Source/BehaviorFilters/Behavior.SelectWithOther.js,
   Source/BehaviorFilters/Behavior.SideBySideSelect.js,
   Source/BehaviorFilters/Behavior.SizeTo.js,

+ 1 - 1
ext/thirdparty/js/art-widgets.hash

@@ -1 +1 @@
-92d01fdaec05555975a7bca78600e8f00bd44a38
+19f2531e9ca789228479add8b882819b452c3325