Node.js based forum software built for the modern web
undo button for skins and themes
psychobunny1e2fb5cd4ca5
diff --git a/public/src/admin/appearance/themes.js b/public/src/admin/appearance/themes.jsindex 6598e7fe4b..c5fbcaa966 100644--- a/public/src/admin/appearance/themes.js+++ b/public/src/admin/appearance/themes.js@@ -40,7 +40,7 @@ define('admin/appearance/themes', function() {});$('#revert_theme').on('click', function() {- bootbox.confirm('Are you sure you wish to remove the custom theme and restore the NodeBB default theme?', function(confirm) {+ bootbox.confirm('Are you sure you wish to restore the default NodeBB theme?', function(confirm) {if (confirm) {socket.emit('admin.themes.set', {type: 'local',diff --git a/src/views/admin/appearance/skins.tpl b/src/views/admin/appearance/skins.tplindex fad2a8d7a2..fe50dead11 100644--- a/src/views/admin/appearance/skins.tpl+++ b/src/views/admin/appearance/skins.tpl@@ -2,15 +2,11 @@<div class="directory row" id="bootstrap_themes"><i class="fa fa-refresh fa-spin"></i> Loading Themes</div>-</div>-<div class="col-lg-3 acp-sidebar">- <div class="panel panel-default">- <div class="panel-heading">Revert to Default</div>- <div class="panel-body">- <p>This will remove any custom Bootswatch skin applied to your NodeBB, and restore the base theme.</p>- <button class="btn btn-warning btn-md" id="revert_theme">Revert to Default</button>- </div>+ <div data-type="bootswatch" data-theme="" data-css="">+ <button data-action="use" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">+ <i class="material-icons">undo</i>+ </button></div></div>diff --git a/src/views/admin/appearance/themes.tpl b/src/views/admin/appearance/themes.tplindex d1a135ef35..e67c6a2755 100644--- a/src/views/admin/appearance/themes.tpl+++ b/src/views/admin/appearance/themes.tpl@@ -2,4 +2,8 @@<div class="directory row" id="installed_themes"><i class="fa fa-refresh fa-spin"></i> Checking for installed themes...</div>-</div>\ No newline at end of file+</div>++<button id="revert_theme" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">+ <i class="material-icons">undo</i>+</button>\ No newline at end of filediff --git a/src/views/admin/partials/theme_list.tpl b/src/views/admin/partials/theme_list.tplindex 930141f806..ebc25cc21b 100644--- a/src/views/admin/partials/theme_list.tpl+++ b/src/views/admin/partials/theme_list.tpl@@ -22,14 +22,4 @@</div></div></div>-<!-- END themes -->--<!-- IF showRevert -->-<li data-type="bootswatch" data-theme="" data-css="">- <div class="pull-right">- <button class="btn btn-primary pull-right" data-action="use">Revert</button>- </div>- <h4>No Skin</h4>- <p>Remove applied skin and revert back to the base colours</p>-</li>-<!-- ENDIF showRevert -->\ No newline at end of file+<!-- END themes -->\ No newline at end of file