1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-08 23:15:29 +02:00

fixed jsbeautifyrc

This commit is contained in:
Harvey Kandola 2016-07-04 14:15:47 -07:00
parent 1cb7121401
commit bb9ac592d9
2 changed files with 104 additions and 102 deletions

View file

@ -1,55 +1,57 @@
{ {
"css": { "css": {
"indent_size": 4, "indent_size": 4,
"indent_level": 0, "indent_level": 0,
"indent_with_tabs": true "indent_with_tabs": true,
"allowed_file_extensions": ["css", "scss", "sass", "less"] "allowed_file_extensions": ["css", "scss", "sass", "less"],
"max_preserve_newlines": 2
},
"html": {
"indent_size": 4,
"indent_level": 0,
"indent_with_tabs": true,
"preserve_newlines": true,
"max_preserve_newlines": 2, "max_preserve_newlines": 2,
}, "wrap_line_length": 0,
"html": { "indent_handlebars": true,
"indent_inner_html": false,
"indent_scripts": "keep"
},
"hbs": {
"indent_size": 4, "indent_size": 4,
"indent_level": 0, "indent_level": 0,
"indent_with_tabs": true "indent_with_tabs": true,
"preserve_newlines": true,
"max_preserve_newlines": 2, "max_preserve_newlines": 2,
"wrap_line_length": 0, "preserve_newlines": true,
"indent_handlebars": true, "wrap_line_length": 0
"indent_inner_html": false, },
"indent_scripts": "keep" "js": {
},
"hbs": {
"indent_size": 4, "indent_size": 4,
"indent_level": 0, "indent_level": 0,
"indent_with_tabs": true "indent_with_tabs": true,
"preserve_newlines": true,
"wrap_line_length": 0,
"break_chained_methods": false,
"max_preserve_newlines": 2, "max_preserve_newlines": 2,
"preserve_newlines": true, "jslint_happy": true,
"wrap_line_length": 0 "brace_style": "collapse-preserve-inline",
}, "keep_function_indentation": false,
"js": { "space_after_anon_function": false,
"space_before_conditional": true,
"space_in_empty_paren": false,
"space_in_paren": false
},
"sql": {
"indent_size": 4, "indent_size": 4,
"indent_level": 0, "indent_level": 0,
"indent_with_tabs": true "indent_with_tabs": true
"preserve_newlines": true, },
"wrap_line_length": 0, "_default": {
"break_chained_methods": false,
"max_preserve_newlines": 2,
"jslint_happy": true,
"brace_style": "collapse-preserve-inline",
"space_after_anon_function": false,
"keep_function_indentation": false,
"space_before_conditional": true
},
"sql": {
"indent_size": 4,
"indent_level": 0,
"indent_with_tabs": true
},
"_default": {
"indent_size": 4, "indent_size": 4,
"indent_level": 0, "indent_level": 0,
"indent_with_tabs": true "indent_with_tabs": true,
"preserve_newlines": true, "preserve_newlines": true,
"max_preserve_newlines": 2, "max_preserve_newlines": 2,
"wrap_line_length": 0 "wrap_line_length": 0
} }
} }

View file

@ -12,80 +12,80 @@
import Ember from 'ember'; import Ember from 'ember';
export default Ember.Component.extend({ export default Ember.Component.extend({
drop: null, drop: null,
cancelLabel: "Close", cancelLabel: "Close",
actionLabel: "Save", actionLabel: "Save",
tip: "Short and concise title for the page", tip: "Short and concise title for the page",
busy: false, busy: false,
didRender() { didRender() {
let self = this; let self = this;
Mousetrap.bind('esc', function() { Mousetrap.bind('esc', function () {
self.send('onCancel'); self.send('onCancel');
return false; return false;
}); });
Mousetrap.bind(['ctrl+s', 'command+s'], function() { Mousetrap.bind(['ctrl+s', 'command+s'], function () {
self.send('onAction'); self.send('onAction');
return false; return false;
}); });
$("#page-title").removeClass("error"); $("#page-title").removeClass("error");
}, },
willDestroyElement() { willDestroyElement() {
let drop = this.get('drop'); let drop = this.get('drop');
if (is.not.null(drop)) { if (is.not.null(drop)) {
drop.destroy(); drop.destroy();
} }
}, },
actions: { actions: {
onCancel() { onCancel() {
if (this.attrs.isDirty() !== null && this.attrs.isDirty()) { if (this.attrs.isDirty() !== null && this.attrs.isDirty()) {
$(".discard-edits-dialog").css("display", "block"); $(".discard-edits-dialog").css("display", "block");
let drop = new Drop({ let drop = new Drop({
target: $("#editor-cancel")[0], target: $("#editor-cancel")[0],
content: $(".cancel-edits-dialog")[0], content: $(".cancel-edits-dialog")[0],
classes: 'drop-theme-basic', classes: 'drop-theme-basic',
position: "bottom right", position: "bottom right",
openOn: "always", openOn: "always",
tetherOptions: { tetherOptions: {
offset: "5px 0", offset: "5px 0",
targetOffset: "10px 0" targetOffset: "10px 0"
}, },
remove: false remove: false
}); });
this.set('drop', drop); this.set('drop', drop);
return; return;
} }
this.attrs.onCancel(); this.attrs.onCancel();
}, },
onAction() { onAction() {
if (this.get('busy')) { if (this.get('busy')) {
return; return;
} }
if (is.empty(this.get('page.title'))) { if (is.empty(this.get('page.title'))) {
$("#page-title").addClass("error").focus(); $("#page-title").addClass("error").focus();
return; return;
} }
this.attrs.onAction(this.get('page.title')); this.attrs.onAction(this.get('page.title'));
}, },
keepEditing() { keepEditing() {
let drop = this.get('drop'); let drop = this.get('drop');
drop.close(); drop.close();
}, },
discardEdits() { discardEdits() {
this.attrs.onCancel(); this.attrs.onCancel();
} }
} }
}); });