Browse Source

HUE-269. Disable "smart" typing in PostEditor

Because the only thing CCS.PostEditor.Simple does is enable the options
for PostEditor, I've removed it entirely.
Philip Zeyliger 15 years ago
parent
commit
3004ffee7d

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

@@ -3,7 +3,7 @@
 
 description: File Editor
 provides: [CCS.FileEditor]
-requires: [ccs-shared/CCS.JBrowser, ccs-shared/CCS.PostEditor.Simple, /CCS.FileBrowser]
+requires: [ccs-shared/CCS.JBrowser, clientcide/PostEditor, /CCS.FileBrowser]
 script: CCS.FileEditor.js
 
 ...

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

@@ -17,14 +17,14 @@
 ---
 description: Creates a SimplePostEditor of any textarea with PostEditor in its data-filters property. 
 provides: [Behavior.PostEditor]
-requires: [Widgets/Behavior, /CCS.PostEditor.Simple]
+requires: [Widgets/Behavior, clientcide/PostEditor]
 script: Behavior.PostEditor.js
 ...
 */
 
 Behavior.addGlobalFilters({
         PostEditor: function(element, methods) {
-                var postEditor = new CCS.PostEditor.Simple(element);
+                var postEditor = new PostEditor(element);
         }
 });
 

+ 0 - 45
desktop/core/static/js/Source/CCS/CCS.PostEditor.Simple.js

@@ -1,45 +0,0 @@
-// 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: An extension of PostEditor with generic post editor rules (smart typing pairs for quotes, parens, brackets, braces, etc).
-
-requires: [clientcide/PostEditor]
-
-provides: [CCS.PostEditor.Simple]
-
-script: CCS.PostEditor.Simple.js
-...
-*/
-CCS.PostEditor = {
-
-	Simple: new Class({
-		Extends: PostEditor,
-		options: {
-			smartTypingPairs: {
-				'"' : '"',
-				'(' : ')',
-				'{' : '}',
-				'[' : ']',
-				"<" : ">",
-				"`" : "`",
-				"'" :"'" 
-			}
-		}
-	})
-
-};

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

@@ -49,7 +49,6 @@ sources: [
   Source/Native/String.CCS.js,
   Source/Native/Element.Data.js,
   Source/StaticThirdParty/DynamicTextarea.js,
-  Source/CCS/CCS.PostEditor.Simple.js,
   Source/UI/ART.SideBySideSelect.js,
   Source/BehaviorFilters/Behavior.CollapsingElements.js,
   Source/BehaviorFilters/Behavior.ContextMenu.js,