Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add a Hide this welcome message #27

Closed
wants to merge 1 commit into from

2 participants

@eddiemonge

No description provided.

@commadelimited

Nice one Eddie. Thanks for referencing my blog post. You're the man creating all of these tickets.

@commadelimited

Any activity on this one? Would be awesome to be able to hide the welcome message for ThemeRoller.

@eddiemonge eddiemonge closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 2, 2011
  1. @eddiemonge
This page is out of date. Refresh to see the latest.
Showing with 26 additions and 1 deletion.
  1. +10 −0 css/tr.css
  2. +14 −0 index.php
  3. +2 −1  js/app.js
View
10 css/tr.css
@@ -85,3 +85,13 @@ img{border: none;}
.highlight {
color: #FD9F24;
}
+
+#dontShowMsg {
+ float: right;
+ text-align: right;
+}
+
+#dontShowMsg input, #dontShowMsg label {
+ cursor: pointer;
+}
+
View
14 index.php
@@ -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
3  js/app.js
@@ -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 );
Something went wrong with that request. Please try again.