Private GIT

Skip to content
Snippets Groups Projects
Commit 1adb8f09 authored by X O's avatar X O
Browse files

Merge pull request #712 from OmgImAlexis/develop

use class for browser dialog
parents b3491410 83768e92
Branches
Tags
No related merge requests found
#fileBrowserDialog { .fileBrowserDialog {
max-height: 480px; max-height: 480px;
overflow-y: auto; overflow-y: auto;
} }
#fileBrowserDialog ul { .fileBrowserDialog ul {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#fileBrowserDialog ul li { .fileBrowserDialog ul li {
margin: 2px 0; margin: 2px 0;
cursor: pointer; cursor: pointer;
list-style-type: none; list-style-type: none;
} }
#fileBrowserDialog ul li a { .fileBrowserDialog ul li a {
display: block; display: block;
padding: 4px 0; padding: 4px 0;
} }
#fileBrowserDialog ul li a:hover { .fileBrowserDialog ul li a:hover {
color: #00f; color: #00f;
background: none; background: none;
} }
#fileBrowserDialog ul li a span.ui-icon { .fileBrowserDialog ul li a .ui-icon {
margin: 0 4px; margin: 0 4px;
float: left; float: left;
} }
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
// make a fileBrowserDialog object if one doesn't exist already // make a fileBrowserDialog object if one doesn't exist already
if (!fileBrowserDialog) { if (!fileBrowserDialog) {
// set up the jquery dialog // set up the jquery dialog
fileBrowserDialog = $('<div id="fileBrowserDialog" style="display:hidden"></div>').appendTo('body').dialog({ fileBrowserDialog = $('<div class="fileBrowserDialog" style="display:hidden"></div>').appendTo('body').dialog({
dialogClass: 'browserDialog', dialogClass: 'browserDialog',
title: options.title, title: options.title,
position: { my: 'center top', at: 'center top+60', of: window }, position: { my: 'center top', at: 'center top+60', of: window },
...@@ -89,14 +89,12 @@ ...@@ -89,14 +89,12 @@
modal: true, modal: true,
autoOpen: false autoOpen: false
}); });
} } else {
else {
// The title may change, even if fileBrowserDialog already exists // The title may change, even if fileBrowserDialog already exists
fileBrowserDialog.dialog('option', 'title', options.title); fileBrowserDialog.dialog('option', 'title', options.title);
} }
fileBrowserDialog.dialog('option', 'buttons', [ fileBrowserDialog.dialog('option', 'buttons', [{
{
text: 'Ok', text: 'Ok',
'class': 'btn', 'class': 'btn',
click: function () { click: function () {
...@@ -104,15 +102,13 @@ ...@@ -104,15 +102,13 @@
callback(currentBrowserPath, options); callback(currentBrowserPath, options);
$(this).dialog('close'); $(this).dialog('close');
} }
}, }, {
{
text: 'Cancel', text: 'Cancel',
'class': 'btn', 'class': 'btn',
click: function () { click: function () {
$(this).dialog('close'); $(this).dialog('close');
} }
} }]);
]);
// set up the browser and launch the dialog // set up the browser and launch the dialog
var initialDir = ''; var initialDir = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment