2015-10-10 04:41:21 +08:00
|
|
|
/*
|
|
|
|
** NOTE: This file is generated by Gulp and should not be edited directly!
|
|
|
|
** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.
|
|
|
|
*/
|
|
|
|
|
2015-07-26 08:14:14 +08:00
|
|
|
/// <reference path="Typings/jquery.d.ts" />
|
|
|
|
/// <reference path="Typings/jqueryui.d.ts" />
|
|
|
|
/// <reference path="Typings/knockout.d.ts" />
|
2014-03-22 22:59:41 +08:00
|
|
|
var Orchard;
|
|
|
|
(function (Orchard) {
|
2015-02-24 19:47:57 +08:00
|
|
|
var Azure;
|
2014-03-22 22:59:41 +08:00
|
|
|
(function (Azure) {
|
2015-02-24 19:47:57 +08:00
|
|
|
var MediaServices;
|
2014-03-22 22:59:41 +08:00
|
|
|
(function (MediaServices) {
|
2015-02-24 19:47:57 +08:00
|
|
|
var Admin;
|
2014-03-22 22:59:41 +08:00
|
|
|
(function (Admin) {
|
2015-02-24 19:47:57 +08:00
|
|
|
var Settings;
|
2014-03-22 22:59:41 +08:00
|
|
|
(function (Settings) {
|
|
|
|
var StringItem = (function () {
|
|
|
|
function StringItem(value) {
|
|
|
|
this.value = ko.observable(value);
|
|
|
|
}
|
|
|
|
return StringItem;
|
|
|
|
})();
|
|
|
|
Settings.StringItem = StringItem;
|
2014-09-09 01:07:23 +08:00
|
|
|
var EncodingPreset = (function () {
|
|
|
|
function EncodingPreset(name, customXml) {
|
|
|
|
this.name = ko.observable(name);
|
|
|
|
this.customXml = ko.observable(customXml);
|
|
|
|
this.isExpanded = ko.observable(false);
|
|
|
|
this.type = ko.computed(function () {
|
|
|
|
var customXml = this.customXml();
|
|
|
|
if (!!customXml && customXml.length > 0)
|
|
|
|
return "Custom preset";
|
|
|
|
return "Standard preset";
|
|
|
|
}, this);
|
|
|
|
}
|
|
|
|
EncodingPreset.prototype.toggle = function () {
|
|
|
|
this.isExpanded(!this.isExpanded());
|
|
|
|
};
|
|
|
|
return EncodingPreset;
|
|
|
|
})();
|
|
|
|
Settings.EncodingPreset = EncodingPreset;
|
2014-03-22 22:59:41 +08:00
|
|
|
Settings.clientViewModel = {
|
|
|
|
wamsEncodingPresets: ko.observableArray(),
|
|
|
|
defaultWamsEncodingPresetIndex: ko.observable(),
|
|
|
|
subtitleLanguages: ko.observableArray()
|
|
|
|
};
|
|
|
|
function deleteWamsEncodingPreset(preset) {
|
|
|
|
var removedIndex = Settings.clientViewModel.wamsEncodingPresets.indexOf(preset);
|
|
|
|
Settings.clientViewModel.wamsEncodingPresets.remove(preset);
|
|
|
|
if (removedIndex === Settings.clientViewModel.defaultWamsEncodingPresetIndex())
|
|
|
|
Settings.clientViewModel.defaultWamsEncodingPresetIndex(0);
|
|
|
|
else if (removedIndex < Settings.clientViewModel.defaultWamsEncodingPresetIndex())
|
|
|
|
Settings.clientViewModel.defaultWamsEncodingPresetIndex(Settings.clientViewModel.defaultWamsEncodingPresetIndex() - 1);
|
|
|
|
}
|
|
|
|
Settings.deleteWamsEncodingPreset = deleteWamsEncodingPreset;
|
|
|
|
function addNewWamsEncodingPreset() {
|
2014-09-09 01:07:23 +08:00
|
|
|
Settings.clientViewModel.wamsEncodingPresets.push(new EncodingPreset("Unnamed", null));
|
2014-03-22 22:59:41 +08:00
|
|
|
$("#presets-table tbody:first-of-type tr:last-of-type td:nth-child(2) input").focus().select();
|
|
|
|
}
|
|
|
|
Settings.addNewWamsEncodingPreset = addNewWamsEncodingPreset;
|
|
|
|
function deleteSubtitleLanguage(languageCultureCode) {
|
|
|
|
Settings.clientViewModel.subtitleLanguages.remove(languageCultureCode);
|
|
|
|
}
|
|
|
|
Settings.deleteSubtitleLanguage = deleteSubtitleLanguage;
|
|
|
|
function addNewSubtitleLanguage() {
|
|
|
|
Settings.clientViewModel.subtitleLanguages.push(new StringItem("Unnamed"));
|
|
|
|
$("#languages-table tbody:first-of-type tr:last-of-type td:nth-child(1) input").focus().select();
|
|
|
|
}
|
|
|
|
Settings.addNewSubtitleLanguage = addNewSubtitleLanguage;
|
|
|
|
$(function () {
|
2014-09-09 01:07:23 +08:00
|
|
|
$.each(initWamsEncodingPresets, function (presetIndex, preset) {
|
|
|
|
Settings.clientViewModel.wamsEncodingPresets.push(new EncodingPreset(preset.name, preset.customXml));
|
2014-03-22 22:59:41 +08:00
|
|
|
});
|
|
|
|
Settings.clientViewModel.defaultWamsEncodingPresetIndex(initDefaultWamsEncodingPresetIndex);
|
|
|
|
$.each(initSubtitleLanguages, function (languageIndex, languageCultureCode) {
|
|
|
|
Settings.clientViewModel.subtitleLanguages.push(new StringItem(languageCultureCode));
|
|
|
|
});
|
|
|
|
ko.applyBindings(Settings.clientViewModel);
|
|
|
|
var localStorage = window["localStorage"];
|
|
|
|
$("#tabs").tabs({
|
|
|
|
activate: function () {
|
|
|
|
if (localStorage && localStorage.setItem)
|
|
|
|
localStorage.setItem("selectedCloudMediaSettingsTab", $("#tabs").tabs("option", "active"));
|
|
|
|
},
|
|
|
|
active: localStorage && localStorage.getItem ? localStorage.getItem("selectedCloudMediaSettingsTab") : null
|
|
|
|
}).show();
|
|
|
|
});
|
2015-02-24 19:47:57 +08:00
|
|
|
})(Settings = Admin.Settings || (Admin.Settings = {}));
|
|
|
|
})(Admin = MediaServices.Admin || (MediaServices.Admin = {}));
|
|
|
|
})(MediaServices = Azure.MediaServices || (Azure.MediaServices = {}));
|
|
|
|
})(Azure = Orchard.Azure || (Orchard.Azure = {}));
|
2015-03-04 09:22:19 +08:00
|
|
|
})(Orchard || (Orchard = {}));
|
2015-07-26 08:14:14 +08:00
|
|
|
|
2024-04-16 22:55:04 +08:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsb3VkbWVkaWEtYWRtaW4tc2V0dGluZ3MuanMiLCJjbG91ZG1lZGlhLWFkbWluLXNldHRpbmdzLnRzIl0sIm5hbWVzIjpbIk9yY2hhcmQiLCJPcmNoYXJkLkF6dXJlIiwiT3JjaGFyZC5BenVyZS5NZWRpY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