mirror of
https://github.com/documize/community.git
synced 2025-08-08 23:15:29 +02:00
fixed jsbeautifyrc
This commit is contained in:
parent
1cb7121401
commit
bb9ac592d9
2 changed files with 104 additions and 102 deletions
|
@ -1,55 +1,57 @@
|
|||
{
|
||||
"css": {
|
||||
"css": {
|
||||
"indent_size": 4,
|
||||
"indent_level": 0,
|
||||
"indent_with_tabs": true
|
||||
"allowed_file_extensions": ["css", "scss", "sass", "less"]
|
||||
"indent_with_tabs": true,
|
||||
"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,
|
||||
},
|
||||
"html": {
|
||||
"wrap_line_length": 0,
|
||||
"indent_handlebars": true,
|
||||
"indent_inner_html": false,
|
||||
"indent_scripts": "keep"
|
||||
},
|
||||
"hbs": {
|
||||
"indent_size": 4,
|
||||
"indent_level": 0,
|
||||
"indent_with_tabs": true
|
||||
"preserve_newlines": true,
|
||||
"indent_with_tabs": true,
|
||||
"max_preserve_newlines": 2,
|
||||
"wrap_line_length": 0,
|
||||
"indent_handlebars": true,
|
||||
"indent_inner_html": false,
|
||||
"indent_scripts": "keep"
|
||||
},
|
||||
"hbs": {
|
||||
"preserve_newlines": true,
|
||||
"wrap_line_length": 0
|
||||
},
|
||||
"js": {
|
||||
"indent_size": 4,
|
||||
"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,
|
||||
"preserve_newlines": true,
|
||||
"wrap_line_length": 0
|
||||
},
|
||||
"js": {
|
||||
"jslint_happy": true,
|
||||
"brace_style": "collapse-preserve-inline",
|
||||
"keep_function_indentation": false,
|
||||
"space_after_anon_function": false,
|
||||
"space_before_conditional": true,
|
||||
"space_in_empty_paren": false,
|
||||
"space_in_paren": false
|
||||
},
|
||||
"sql": {
|
||||
"indent_size": 4,
|
||||
"indent_level": 0,
|
||||
"indent_with_tabs": true
|
||||
"preserve_newlines": true,
|
||||
"wrap_line_length": 0,
|
||||
"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": {
|
||||
},
|
||||
"_default": {
|
||||
"indent_size": 4,
|
||||
"indent_level": 0,
|
||||
"indent_with_tabs": true
|
||||
"preserve_newlines": true,
|
||||
"indent_with_tabs": true,
|
||||
"preserve_newlines": true,
|
||||
"max_preserve_newlines": 2,
|
||||
"wrap_line_length": 0
|
||||
}
|
||||
}
|
||||
"wrap_line_length": 0
|
||||
}
|
||||
}
|
|
@ -12,80 +12,80 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
drop: null,
|
||||
cancelLabel: "Close",
|
||||
actionLabel: "Save",
|
||||
tip: "Short and concise title for the page",
|
||||
busy: false,
|
||||
drop: null,
|
||||
cancelLabel: "Close",
|
||||
actionLabel: "Save",
|
||||
tip: "Short and concise title for the page",
|
||||
busy: false,
|
||||
|
||||
didRender() {
|
||||
let self = this;
|
||||
Mousetrap.bind('esc', function() {
|
||||
self.send('onCancel');
|
||||
return false;
|
||||
});
|
||||
Mousetrap.bind(['ctrl+s', 'command+s'], function() {
|
||||
self.send('onAction');
|
||||
return false;
|
||||
});
|
||||
didRender() {
|
||||
let self = this;
|
||||
Mousetrap.bind('esc', function () {
|
||||
self.send('onCancel');
|
||||
return false;
|
||||
});
|
||||
Mousetrap.bind(['ctrl+s', 'command+s'], function () {
|
||||
self.send('onAction');
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#page-title").removeClass("error");
|
||||
},
|
||||
$("#page-title").removeClass("error");
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
let drop = this.get('drop');
|
||||
willDestroyElement() {
|
||||
let drop = this.get('drop');
|
||||
|
||||
if (is.not.null(drop)) {
|
||||
drop.destroy();
|
||||
}
|
||||
},
|
||||
if (is.not.null(drop)) {
|
||||
drop.destroy();
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
onCancel() {
|
||||
if (this.attrs.isDirty() !== null && this.attrs.isDirty()) {
|
||||
$(".discard-edits-dialog").css("display", "block");
|
||||
actions: {
|
||||
onCancel() {
|
||||
if (this.attrs.isDirty() !== null && this.attrs.isDirty()) {
|
||||
$(".discard-edits-dialog").css("display", "block");
|
||||
|
||||
let drop = new Drop({
|
||||
target: $("#editor-cancel")[0],
|
||||
content: $(".cancel-edits-dialog")[0],
|
||||
classes: 'drop-theme-basic',
|
||||
position: "bottom right",
|
||||
openOn: "always",
|
||||
tetherOptions: {
|
||||
offset: "5px 0",
|
||||
targetOffset: "10px 0"
|
||||
},
|
||||
remove: false
|
||||
});
|
||||
let drop = new Drop({
|
||||
target: $("#editor-cancel")[0],
|
||||
content: $(".cancel-edits-dialog")[0],
|
||||
classes: 'drop-theme-basic',
|
||||
position: "bottom right",
|
||||
openOn: "always",
|
||||
tetherOptions: {
|
||||
offset: "5px 0",
|
||||
targetOffset: "10px 0"
|
||||
},
|
||||
remove: false
|
||||
});
|
||||
|
||||
this.set('drop', drop);
|
||||
this.set('drop', drop);
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this.attrs.onCancel();
|
||||
},
|
||||
this.attrs.onCancel();
|
||||
},
|
||||
|
||||
onAction() {
|
||||
if (this.get('busy')) {
|
||||
return;
|
||||
}
|
||||
onAction() {
|
||||
if (this.get('busy')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (is.empty(this.get('page.title'))) {
|
||||
$("#page-title").addClass("error").focus();
|
||||
return;
|
||||
}
|
||||
if (is.empty(this.get('page.title'))) {
|
||||
$("#page-title").addClass("error").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
this.attrs.onAction(this.get('page.title'));
|
||||
},
|
||||
this.attrs.onAction(this.get('page.title'));
|
||||
},
|
||||
|
||||
keepEditing() {
|
||||
let drop = this.get('drop');
|
||||
drop.close();
|
||||
},
|
||||
keepEditing() {
|
||||
let drop = this.get('drop');
|
||||
drop.close();
|
||||
},
|
||||
|
||||
discardEdits() {
|
||||
this.attrs.onCancel();
|
||||
}
|
||||
}
|
||||
});
|
||||
discardEdits() {
|
||||
this.attrs.onCancel();
|
||||
}
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue