Add a Hide this welcome message #27

Closed
wants to merge 1 commit into
from
View
@@ -85,3 +85,13 @@ img{border: none;}
.highlight {
color: #FD9F24;
}
+
+#dontShowMsg {
+ float: right;
+ text-align: right;
+}
+
+#dontShowMsg input, #dontShowMsg label {
+ cursor: pointer;
+}
+
View
@@ -3,6 +3,12 @@
if ( isset($_GET['style_id']) ) {
$style_id = $_GET['style_id'];
}
+
+session_start();
+if ( isset($_POST['show_welcome']) && $_POST['show_welcome'] ) {
+ $_SESSION['show_welcome'] = 'yes';
+ exit;
+}
?>
<!DOCTYPE html>
<html>
@@ -38,6 +44,7 @@
</div>
<div id="interface">
+ <?php if ( !isset($_SESSION['show_welcome']) || $_SESSION['show_welcome'] === 'yes' ) : ?>
<div id="welcome" class="dialog" title=" ">
<h1><strong>Welcome</strong> to ThemeRoller for jQuery Mobile</h1>
<p>
@@ -68,8 +75,15 @@
<div class="color-drag disabled" style="background-color: #33CCCC"></div>
<div class="color-drag disabled" style="background-color: #33CCFF"></div>
</div>
+ <div id="dontShowMsg">
+ <label>
+ Show this dialog every visit
+ <input type="checkbox" id="show_welcome" value="true" />
+ </label>
+ </div>
</div>
</div>
+ <?php endif; ?>
<div id="upload" class="dialog" title=" ">
View
@@ -50,6 +50,7 @@ $.tr.initializeThemeRoller = function()
draggable: false,
buttons: {
"Get Rolling": function() {
+ $.post( "index.php", { show_welcome: $( "#show_welcome" ).prop('checked') } );
$( this ).dialog( "close" );
}
}
@@ -1600,4 +1601,4 @@ $.tr.initializeThemeRoller = function()
-})( jQuery, window );
+})( jQuery, window );