Merge fixes

This commit is contained in:
softworkz 2016-02-05 03:01:03 +01:00
parent a252b74db2
commit 15a66799a8
2 changed files with 16 additions and 6 deletions

View File

@ -4,7 +4,7 @@
<title>${TitleAutoOrganize}</title>
</head>
<body>
<div id="libraryFileOrganizerSmartMatchPage" data-role="page" class="page type-interior organizePage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Auto-Organize" data-require="jqmtable,jqmpopup,scripts/autoorganizesmart,scripts/taskbutton,paperbuttonstyle,detailtablecss">
<div id="libraryFileOrganizerSmartMatchPage" data-role="page" class="page type-interior organizePage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Auto-Organize" data-require="jqmtable,jqmpopup,scripts/autoorganizesmart,scripts/taskbutton,detailtablecss">
<div data-role="content">
<div class="content-primary">

View File

@ -12,14 +12,15 @@
Dashboard.showLoadingMsg();
ApiClient.getSmartMatchInfos(query).done(function (infos) {
ApiClient.getSmartMatchInfos(query).then(function (infos) {
currentResult = infos;
populateList(page, infos);
Dashboard.hideLoadingMsg();
});
}, onApiFailure);
}
function populateList(page, result) {
@ -86,6 +87,15 @@
$('.divMatchInfos', page).html(html).trigger('create');
}
function onApiFailure(e) {
Dashboard.hideLoadingMsg();
Dashboard.alert({
title: Globalize.translate('AutoOrganizeError'),
message: Globalize.translate('ErrorOrganizingFileWithErrorCode', e.getResponseHeader("X-Application-Error-Code"))
});
}
$(document).on('pageinit', "#libraryFileOrganizerSmartMatchPage", function () {
@ -101,15 +111,15 @@
MatchString: button.getAttribute('data-matchstring')
};
ApiClient.deleteSmartMatchEntry(id, options).done(function () {
ApiClient.deleteSmartMatchEntry(id, options).then(function () {
reloadList(page);
});
}, onApiFailure);
});
}).on('pageshowready', "#libraryFileOrganizerSmartMatchPage", function () {
}).on('pageshow', "#libraryFileOrganizerSmartMatchPage", function () {
var page = this;