added shared code style settings for Webstorm

pull/23/head
kay.one 12 years ago
parent 8327849e96
commit e29c07c4a5

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jQuery-1.9.1" level="application" />
</component>
</module>

@ -2,8 +2,38 @@
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value />
<value>
<option name="LINE_SEPARATOR" value="&#13;&#10;" />
<option name="RIGHT_MARGIN" value="190" />
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
<CssCodeStyleSettings>
<option name="HEX_COLOR_UPPER_CASE" value="true" />
<option name="HEX_COLOR_LONG_FORMAT" value="true" />
</CssCodeStyleSettings>
<JSCodeStyleSettings>
<option name="ALIGN_OBJECT_PROPERTIES" value="2" />
</JSCodeStyleSettings>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="CSS">
<indentOptions>
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="true" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="SPACE_AFTER_COLON" value="false" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
</codeStyleSettings>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
</profile>
</component>

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="PROJECT" libraries="{jQuery-1.9.1}" />
</component>
</project>

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JSHintConfiguration" version="1.1.0" use-config-file="false">
<option bitwise="true" />
<option camelcase="false" />
<option curly="true" />
<option eqeqeq="true" />
<option forin="true" />
<option immed="false" />
<option latedef="false" />
<option newcap="false" />
<option noarg="true" />
<option noempty="true" />
<option nonew="true" />
<option plusplus="false" />
<option regexp="false" />
<option undef="true" />
<option unused="false" />
<option strict="true" />
<option trailing="false" />
<option asi="false" />
<option boss="false" />
<option debug="false" />
<option eqnull="false" />
<option es5="false" />
<option esnext="false" />
<option evil="false" />
<option expr="false" />
<option funcscope="false" />
<option globalstrict="true" />
<option iterator="false" />
<option lastsemic="false" />
<option laxbreak="false" />
<option laxcomma="false" />
<option loopfunc="false" />
<option multistr="false" />
<option proto="false" />
<option onecase="false" />
<option regexdash="false" />
<option scripturl="false" />
<option smarttabs="false" />
<option shadow="false" />
<option sub="false" />
<option supernew="false" />
<option validthis="false" />
<option browser="true" />
<option couch="false" />
<option devel="false" />
<option dojo="false" />
<option jquery="false" />
<option mootools="false" />
<option node="false" />
<option nonstandard="false" />
<option prototypejs="false" />
<option rhino="false" />
<option worker="false" />
<option wsh="false" />
<option yui="false" />
<option nomen="false" />
<option onevar="false" />
<option passfail="false" />
<option white="false" />
<option maxerr="50" />
<option predef="NzbDrone, define, Backbone, _, window,Handlebars, console,require,$" />
</component>
</project>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" />
</project>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/NzbDrone.Backbone.iml" filepath="$PROJECT_DIR$/.idea/NzbDrone.Backbone.iml" />
</modules>
</component>
</project>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
</project>

@ -1,4 +1,5 @@
define([
"use strict";
define([
'app',
'AddSeries/RootFolders/RootFolderCollection',
'Quality/QualityProfileCollection',

@ -1,4 +1,5 @@
define(['app', 'Missing/MissingModel'], function () {
"use strict";
define(['app', 'Missing/MissingModel'], function () {
NzbDrone.Missing.MissingCollection = Backbone.Collection.extend({
url : NzbDrone.Constants.ApiRoot + '/missing',
model : NzbDrone.Missing.MissingModel,

@ -17,13 +17,14 @@ define(['app', 'Missing/MissingItemView'], function (app) {
onCompositeCollectionRendered: function () {
this.ui.table.trigger('update');
if(!this.tableSorter && this.collection.length > 0)
{
if (!this.tableSorter && this.collection.length > 0) {
this.tableSorter = this.ui.table.tablesorter({
textExtraction: function (node) {
return node.innerHTML;
},
sortList: [[3,1]],
sortList : [
[3, 1]
],
headers : {
0: {
sorter: 'innerHtml'
@ -58,8 +59,7 @@ define(['app', 'Missing/MissingItemView'], function (app) {
this.applySortIcons();
});
}
else
{
else {
this.ui.table.trigger('update');
}
},
@ -71,14 +71,17 @@ define(['app', 'Missing/MissingItemView'], function (app) {
});
$(this.ui.table).find('th.tablesorter-header').each(function () {
if ($(this).hasClass('tablesorter-headerDesc'))
if ($(this).hasClass('tablesorter-headerDesc')) {
$(this).children('.tablesorter-header-inner').append('<i class="icon-sort-up pull-right">');
}
else if ($(this).hasClass('tablesorter-headerAsc'))
else if ($(this).hasClass('tablesorter-headerAsc')) {
$(this).children('.tablesorter-header-inner').append('<i class="icon-sort-down pull-right">');
}
else if (!$(this).hasClass('sorter-false'))
else if (!$(this).hasClass('sorter-false')) {
$(this).children('.tablesorter-header-inner').append('<i class="icon-sort pull-right">');
}
});
},
updatePageNumber : function (event, stuff) {

@ -1,4 +1,5 @@
require.config({
"use strict";
require.config({
paths: {
'backbone' : 'JsLibraries/backbone',
@ -57,7 +58,7 @@ define('app', function () {
window.NzbDrone.Events = {
OpenModalDialog : 'openModal',
CloseModalDialog: 'closeModal'
},
};
window.NzbDrone.Constants = {
ApiRoot: '/api'
@ -71,8 +72,15 @@ define('app', function () {
//TODO: move this out of here
Handlebars.registerHelper("formatStatus", function (status, monitored) {
if (!monitored) return '<i class="icon-pause grid-icon" title="Not Monitored"></i>';
if (status === 'Continuing') return '<i class="icon-play grid-icon" title="Continuing"></i>';
if (!monitored) {
return '<i class="icon-pause grid-icon" title="Not Monitored"></i>';
}
if (status === 'Continuing') {
return '<i class="icon-play grid-icon" title="Continuing"></i>';
}
return null;
});
return '<i class="icon-stop grid-icon" title="Ended"></i>';
});
@ -80,10 +88,10 @@ define('app', function () {
NzbDrone.addRegions({
titleRegion : '#title-region',
mainRegion : '#main-region',
notificationRegion: '#notification-region',
});
notificationRegion: '#notification-region'
});
window.NzbDrone.start();
return NzbDrone;
@ -93,3 +101,4 @@ define('app', function () {

Loading…
Cancel
Save