1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

focus primary element on forms

This commit is contained in:
Techywarrior 2013-03-28 20:50:46 -07:00
parent 1e5d5344a4
commit 60002c5535
5 changed files with 23 additions and 15 deletions

View file

@ -38,6 +38,8 @@
EditUserPage.loadUser(response1[0] || response1, response2[0], response3[0], response4[0]);
});
$("#editUserProfileForm input:first").focus();
},
loadUser: function (user, loggedInUser, allParentalRatings, allCultures) {
@ -150,7 +152,7 @@
if (userId) {
Dashboard.alert("Settings saved.");
} else {
Dashboard.navigate("userprofiles.html");
Dashboard.navigate("userProfiles.html");
}
},

View file

@ -168,13 +168,12 @@
$('label', popup).html(label);
$('#txtValue', popup).val(initialValue);
popup.popup("open").on("popupafterclose", function () {
popup.on("popupafteropen",function() {
$('#textEntryForm input:first', this).focus();
}).on("popupafterclose", function () {
$(this).off("popupafterclose").off("click");
$('#textEntryForm', this).off("submit");
});
}).popup("open");
$('#textEntryForm', popup).on('submit', function () {

View file

@ -133,7 +133,9 @@
$('#selectTriggerType', page).val('DailyTrigger').trigger('change').selectmenu('refresh');
$('#popupAddTrigger', page).popup("open").on("popupafterclose", function () {
$('#popupAddTrigger', page).on("popupafteropen",function() {
$('#addTriggerForm input:first', this).focus();
}).popup("open").on("popupafterclose", function () {
$('#addTriggerForm', page).off("submit");
$(this).off("popupafterclose");

View file

@ -434,7 +434,7 @@ var Dashboard = {
var hasPrimaryImage = item.ImageTags && item.ImageTags.Primary;
var href = item.IsFolder ? (item.Id ? "itemlist.html?parentId=" + item.Id : "#") : "itemdetails.html?id=" + item.Id;
var href = item.IsFolder ? (item.Id ? "itemList.html?parentId=" + item.Id : "#") : "itemDetails.html?id=" + item.Id;
var showText = options.showTitle || !hasPrimaryImage || (item.Type !== 'Movie' && item.Type !== 'Series' && item.Type !== 'Season' && item.Type !== 'Trailer');
@ -539,7 +539,7 @@ var Dashboard = {
html += '<img style="max-height:125px;max-width:200px;" src="' + imageUrl + '" />';
html += '</p>';
html += '<p><button type="button" onclick="Dashboard.navigate(\'edituser.html?userId=' + user.Id + '\');" data-icon="user">View Profile</button></p>';
html += '<p><button type="button" onclick="Dashboard.navigate(\'editUser.html?userId=' + user.Id + '\');" data-icon="user">View Profile</button></p>';
html += '<p><button type="button" onclick="Dashboard.logout();" data-icon="lock">Sign Out</button></p>';
html += '</div>';
@ -589,7 +589,9 @@ var Dashboard = {
$($.mobile.activePage).append(html);
var popup = $('#popupDirectoryPicker').popup().trigger('create').popup("open").on("popupafterclose", function () {
var popup = $('#popupDirectoryPicker').popup().trigger('create').on("popupafteropen",function() {
$('#popupDirectoryPicker input:first', this).focus();
}).popup("open").on("popupafterclose", function () {
$('form', this).off("submit");
$(this).off("click").off("popupafterclose").remove();
@ -857,11 +859,11 @@ var Dashboard = {
selected: page.hasClass("pluginConfigurationPage")
}, {
name: "User Profiles",
href: "userprofiles.html",
href: "userProfiles.html",
selected: page.hasClass("userProfilesConfigurationPage")
}, {
name: "Display Settings",
href: "uisettings.html",
href: "uiSettings.html",
selected: pageElem.id == "displaySettingsPage"
}, {
name: "Advanced",
@ -869,7 +871,7 @@ var Dashboard = {
selected: pageElem.id == "advancedConfigurationPage"
}, {
name: "Scheduled Tasks",
href: "scheduledtasks.html",
href: "scheduledTasks.html",
selected: pageElem.id == "scheduledTasksPage" || pageElem.id == "scheduledTaskPage"
}, {
name: "Help",
@ -1156,7 +1158,7 @@ $(function () {
var footerHtml = '<div id="footer" class="ui-bar-a">';
footerHtml += '<div id="nowPlayingBar" style="display:none;">';
footerHtml += '<button id="previousTrackButton" class="imageButton mediaButton" title="Previous Track" type="button"><img src="css/images/media/previoustrack.png" /></button>';
//footerHtml += '<button id="stopButton" class="imageButton mediaButton" title="Stop" type="button" onclick="MediaPlayer.stop();"><img src="css/images/media/stop.png" /></button>';
footerHtml += '<button id="stopButton" class="imageButton mediaButton" title="Stop" type="button" onclick="MediaPlayer.stop();"><img src="css/images/media/stop.png" /></button>';
footerHtml += '<button id="nextTrackButton" class="imageButton mediaButton" title="Next Track" type="button"><img src="css/images/media/nexttrack.png" /></button>';
footerHtml += '<div id="mediaElement"></div>';
footerHtml += '<div id="mediaInfo"></div>';

View file

@ -58,7 +58,10 @@
</div>
<script type="text/javascript">
$(function() {
$('#displaySettingsForm input:first').focus();
$('#displaySettingsForm').on('submit', DisplaySettingsPage.onSubmit);
});
</script>
</div>
</body>