first version of re-done config area. needs testing on mobile and other
browsers than firefox.
This commit is contained in:
parent
e9d0d57c15
commit
f6904bfdd5
2 changed files with 18 additions and 36 deletions
16
js/uhr.js
16
js/uhr.js
|
@ -140,8 +140,8 @@
|
|||
}
|
||||
};
|
||||
// private helper methods (not exported)
|
||||
var showConfigScreen = function showConfigScreen() {
|
||||
$('#uhr-controlpanel' + this.id).fadeIn('fast');
|
||||
var toggleConfigScreen = function toggleConfigScreen() {
|
||||
$('#uhr-controlpanel' + this.id).toggle('fast');
|
||||
};
|
||||
// set up
|
||||
var setupHTML = function setupHTML() {
|
||||
|
@ -158,11 +158,6 @@
|
|||
setWidth.bind(this)(this.options.width);
|
||||
|
||||
if (this.options.controls) {
|
||||
var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>');
|
||||
configlink.on('click', function() {
|
||||
showConfigScreen.bind(this)();
|
||||
}.bind(this));
|
||||
e.after(configlink);
|
||||
var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>');
|
||||
var content = $('<div class="content"></div>');
|
||||
controlpanel.append(content);
|
||||
|
@ -201,11 +196,16 @@
|
|||
}
|
||||
var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>');
|
||||
closebutton.on('click', function() {
|
||||
$('#uhr-controlpanel' + this.id).fadeOut('fast');
|
||||
$('#uhr-controlpanel' + this.id).hide('fast');
|
||||
}.bind(this));
|
||||
content.append(closebutton);
|
||||
e.after(controlpanel);
|
||||
controlpanel.hide();
|
||||
var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>');
|
||||
configlink.on('click', function() {
|
||||
toggleConfigScreen.bind(this)();
|
||||
}.bind(this));
|
||||
e.after(configlink);
|
||||
}
|
||||
};
|
||||
var wireFunctionality = function wireFunctionality() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue