diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js
index 4c240a2ec..b5baf6301 100644
--- a/www/common/sframe-common-outer.js
+++ b/www/common/sframe-common-outer.js
@@ -1115,7 +1115,13 @@ define([
if (parsed.hashData) { currentPad.hash = parsed.hashData.getHash(opts); }
// Rendered (maybe hidden) hash
var hiddenParsed = Utils.Hash.parsePadUrl(window.location.href);
+
+ // Update the hash in the address bar
+ var ohc = window.onhashchange;
+ window.onhashchange = function () {};
window.location.href = hiddenParsed.getUrl(opts);
+ window.onhashchange = ohc;
+ ohc({reset: true});
});
diff --git a/www/slide/inner.js b/www/slide/inner.js
index b051724e2..71f25f4e7 100644
--- a/www/slide/inner.js
+++ b/www/slide/inner.js
@@ -348,7 +348,7 @@ define([
}
if (back) {
backColor = back;
- //$modal.css('background-color', back);
+ $modal.find('.cp-app-slide-frame').css('background-color', back);
$('#' + SLIDE_BACKCOLOR_ID).find('i').css('color', back);
slideOptions.bgColor = back;
}
@@ -362,6 +362,10 @@ define([
framework.localChange();
};
+ var $check = $("#cp-app-slide-colorpicker");
+ var $backgroundPicker = $('', { type: 'color', value: backColor })
+ .css({ display: 'none', })
+ .on('change', function() { updateLocalColors(undefined, this.value); });
var $back = framework._.sfCommon.createButton(null, true, {
icon: 'fa-square',
text: Messages.slide_backCol,
@@ -369,24 +373,7 @@ define([
hiddenReadOnly: true,
name: 'background',
id: SLIDE_BACKCOLOR_ID
- });
- var $text = framework._.sfCommon.createButton(null, true, {
- icon: 'fa-i-cursor',
- text: Messages.slide_textCol,
- title: Messages.colorButtonTitle,
- hiddenReadOnly: true,
- name: 'color',
- id: SLIDE_COLOR_ID
- });
- var $testColor = $('', { type: 'color', value: '!' });
- var $check = $("#cp-app-slide-colorpicker");
- if ($testColor.attr('type') !== "color" || $testColor.val() === '!') { return; }
-
- var $backgroundPicker = $('', { type: 'color', value: backColor })
- .css({ display: 'none', })
- .on('change', function() { updateLocalColors(undefined, this.value); });
- $check.append($backgroundPicker);
- $back.on('click', function() {
+ }, function () {
$backgroundPicker.val(backColor);
$backgroundPicker.click();
});
@@ -394,11 +381,22 @@ define([
var $foregroundPicker = $('', { type: 'color', value: textColor })
.css({ display: 'none', })
.on('change', function() { updateLocalColors(this.value, undefined); });
- $check.append($foregroundPicker);
- $text.on('click', function() {
+ var $text = framework._.sfCommon.createButton(null, true, {
+ icon: 'fa-i-cursor',
+ text: Messages.slide_textCol,
+ title: Messages.colorButtonTitle,
+ hiddenReadOnly: true,
+ name: 'color',
+ id: SLIDE_COLOR_ID
+ }, function () {
$foregroundPicker.val(textColor);
$foregroundPicker.click();
});
+ var $testColor = $('', { type: 'color', value: '!' });
+ if ($testColor.attr('type') !== "color" || $testColor.val() === '!') { return; }
+
+ $check.append($backgroundPicker);
+ $check.append($foregroundPicker);
framework._.toolbar.$theme.append($text).append($back);
@@ -524,6 +522,8 @@ define([
if (newPad) {
colors.updateLocalColors('#000', '#FFF');
+ } else {
+ colors.updateLocalColors('#FFF', '#000');
}
CodeMirror.setMode('markdown', function () { });