code refactor

This commit is contained in:
MaysWind 2016-11-06 15:23:08 +08:00
parent 9475694a95
commit 35f7ae1177
3 changed files with 103 additions and 97 deletions

View file

@ -298,6 +298,7 @@
<script src="scripts/core/root.js"></script> <script src="scripts/core/root.js"></script>
<script src="scripts/config/constants.js"></script> <script src="scripts/config/constants.js"></script>
<script src="scripts/config/configuration.js"></script> <script src="scripts/config/configuration.js"></script>
<script src="scripts/config/fileTypes.js"></script>
<script src="scripts/config/initiator.js"></script> <script src="scripts/config/initiator.js"></script>
<script src="scripts/config/languages.js"></script> <script src="scripts/config/languages.js"></script>
<script src="scripts/config/defaultLanguage.js"></script> <script src="scripts/config/defaultLanguage.js"></script>

View file

@ -15,103 +15,6 @@
lazySaveTimeout: 500, lazySaveTimeout: 500,
errorTooltipDelay: 500, errorTooltipDelay: 500,
notificationInPageTimeout: 2000 notificationInPageTimeout: 2000
}).constant('ariaNgFileTypes', {
video: [
'.3gp',
'.3gpp',
'.asf',
'.asx',
'.avi',
'.dat',
'.flv',
'.m4v',
'.mkv',
'.mov',
'.mp4',
'.mpe',
'.mpeg',
'.mpg',
'.rm',
'.rmvb',
'.vob',
'.wmv'
],
audio: [
'.aac',
'.amr',
'.ape',
'.flac',
'.m4a',
'.mid',
'.mp3',
'.ogg',
'.ra',
'.vqf',
'.wav',
'.wma'
],
picture: [
'.bmp',
'.emf',
'.gif',
'.jp2',
'.jpeg',
'.jpg',
'.png',
'.psd',
'.raw',
'.tga',
'.tif',
'.tiff',
'.wmf'
],
document: [
'.doc',
'.docx',
'.key',
'.numbers',
'.odp',
'.ods',
'.odt',
'.pages',
'.pdf',
'.ppt',
'.pptx',
'.rtf',
'.txt',
'.vsd',
'.vsdx',
'.wps',
'.xls',
'.xlsx'
],
application: [
'.apk',
'.bat',
'.com',
'.deb',
'.dll',
'.dmg',
'.exe',
'.ipa',
'.jar',
'.rpm',
'.sh'
],
archive: [
'.7z',
'.arj',
'.bz2',
'.cab',
'.gz',
'.iso',
'.r',
'.rar',
'.tar',
'.tar',
'.z',
'.zip'
]
}).constant('ariaNgDefaultOptions', { }).constant('ariaNgDefaultOptions', {
language: 'en', language: 'en',
title: '${downspeed}, ${upspeed} - ${title}', title: '${downspeed}, ${upspeed} - ${title}',

View file

@ -0,0 +1,102 @@
(function () {
'use strict';
angular.module('ariaNg').constant('ariaNgFileTypes', {
video: [
'.3gp',
'.3gpp',
'.asf',
'.asx',
'.avi',
'.dat',
'.flv',
'.m4v',
'.mkv',
'.mov',
'.mp4',
'.mpe',
'.mpeg',
'.mpg',
'.rm',
'.rmvb',
'.vob',
'.wmv'
],
audio: [
'.aac',
'.amr',
'.ape',
'.flac',
'.m4a',
'.mid',
'.mp3',
'.ogg',
'.ra',
'.vqf',
'.wav',
'.wma'
],
picture: [
'.bmp',
'.emf',
'.gif',
'.jp2',
'.jpeg',
'.jpg',
'.png',
'.psd',
'.raw',
'.tga',
'.tif',
'.tiff',
'.wmf'
],
document: [
'.doc',
'.docx',
'.key',
'.numbers',
'.odp',
'.ods',
'.odt',
'.pages',
'.pdf',
'.ppt',
'.pptx',
'.rtf',
'.txt',
'.vsd',
'.vsdx',
'.wps',
'.xls',
'.xlsx'
],
application: [
'.apk',
'.bat',
'.com',
'.deb',
'.dll',
'.dmg',
'.exe',
'.ipa',
'.jar',
'.rpm',
'.sh'
],
archive: [
'.7z',
'.arj',
'.bz2',
'.cab',
'.gz',
'.iso',
'.r',
'.rar',
'.tar',
'.tar',
'.z',
'.zip'
]
});
}());