This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Update LICENSE files (still CC3.0, was missing in places); Bring demo…

…s up to jquery 1.7
  • Loading branch information...
jtsage committed Nov 6, 2011
1 parent 187ba36 commit 65773ba65743974c59bf235f684af8eb56c1b579
Showing with 60 additions and 113 deletions.
  1. +24 −0 LICENSE
  2. +4 −70 README.md
  3. +16 −0 build/make.pl
  4. +4 −0 demos/README.md
  5. +1 −3 demos/blank.html
  6. +1 −3 demos/bool.html
  7. +1 −3 demos/config.html
  8. +0 −24 demos/extras.js
  9. +1 −3 demos/install.html
  10. +1 −3 demos/string.html
  11. +1 −2 index.html
  12. +2 −2 js/jquery.mobile.simpledialog.js
  13. +4 −0 tests/README.md
View
24 LICENSE
@@ -0,0 +1,24 @@
+jQuery Mobile Framework : plugin to provide a simple popup (modal) or jQMdialog (page) Dialog widget.
+Copyright (c) JTSage
+CC 3.0 Attribution. May be relicensed without permission/notifcation.
+https://github.com/jtsage/jquery-mobile-simpledialog
+
+You are free:
+ * to Share - to copy, distribute and transmit the work
+ * to Remix - to adapt the work
+ * to make commercial use of the work
+
+Under the following conditions:
+ * Attribution - You must attribute JQM-DateBox to JTSage (with link).
+
+With the understanding that:
+
+ * Waiver - Any of the above conditions can be waived if you get permission from the copyright holder.
+ * Public Domain - Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license.
+
+ * Other Rights - In no way are any of the following rights affected by the license:
+ * Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
+ * The author's moral rights;
+ * Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.
+
+ * Notice - For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
View
@@ -1,86 +1,20 @@
jQuery-Mobile-SimpleDialog
==========================
-SimpleDialog is a very simple popup (modal) or jQMdialog (page) Dialog widget. For usage, see the source of the [demo](http://dev.jtsage.com/jQM-SimpleDialog/).
-
+SimpleDialog is a very simple popup (modal) or jQMdialog (page) Dialog widget. For usage, see [docs and demos](http://dev.jtsage.com/jQM-SimpleDialog/).
SimpleDialog Features
---------------------
-* Two display modes, either a button choice (bool), or a text entry (string).
+* Three display modes, either a button choice (bool), a text entry (string), or freeform html (blank).
* Attempts to position itself centered over the input, however, for small screens, it will open a dialog window instead.
-* Click outside the widget to close.
+* Click outside the widget to close. (configurable)
* Options can be configured via data-options attribute
-Suggested Use
--------------
-The use of SimpleDialog is just that, very simple. Assuming a trigger of a usual button, i.e.:
-
- <a href='#' id='diag1' data-role='button'>Simple Dialog, String Style</a>
-
-A typical SimpleDialog code block would look like:
-
- $('#diag1').live('click', function() {
- $(this).simpledialog({
- 'mode' : 'string',
- 'prompt' : 'Type Something!',
- 'buttons' : {
- 'Done, Submit': {
- click: function () {
- alert('You Wrote: ' + $('#diag1').attr('data-string'));
- }
- },
- 'Cancel': {
- click: function () { return true; },
- icon: "delete",
- theme: "c"
- }
- }
- })
- });
-
-#### Global Option Overrides:
-
- // AFTER loading jQM
- jQuery.extend(jQuery.mobile.simpledialog.prototype.options, {
- 'useDialogForceTrue': true
- });
-
Available Options
-----------------
-These can be passed to the dialog via an object set at the data-options attribute, or in the standard method
-
-* __option__ : Description _(default value)_
-
-### Themeing:
-* __pickPageTheme__ : Theme for popup window or dialog. _(b)_
-* __pickPageInputTheme__ : String Mode Input Element. _(e)_
-* __pickPageButtonTheme__ : Widget buttons. _(a)_
-* __zindex__ : Z-Index for popup window. _(500)_
-
-### Customization:
-* __mode__ : Mode of operation - either 'bool' Choice buttons, or 'string' input. _(bool)_
-* __prompt__ : Prompt for dialog, or false to suppress display. _(Are you sure?)_
-* __buttons__ : Object for buttons. _(null)_
-* __allowReopen__ : Allow widget to reopen. _(true)_
-* __useModal__ : Use modal styling - fade out background. _(true)_
-* __forceInput__ : Force the user to choose a button in popup mode. _(true)_
-* __useDialogForceTrue__ : Boolean *Always* use Dialog Window, regardless of screen size. _(false)_
-* __useDialogForceFalse__ : Boolean *Never* use Dialog Window, regardless of screen size. _(false)_
-* __enterToTrigger__ : Index of the button to trigger on ENTER [string mode]. _(0)_
-* __escToTrigger__ : Index of the button to trigger on ESC [string mode]. _(1)_
-
-### Button Customization:
-* __click__ : Function to perform on click
-* __icon__ : Icon for button
-* __theme__ : Theme for button
-
-### Runtime Fun:
-* __butObj__ : contains the button objects. e.g. butObj[0].trigger('click') might be fun.
-* __sawOnce__ : on a forceInput dialog, set to false to allow it to open again.
-
-_Note: forceInput + useModal is the rough equivalent to modal: true in ui.dialog_
+Check out a full list of options in the [api docs](http://dev.jtsage.com/jQM-SimpleDialog/demos/config.html).
View
@@ -3,6 +3,8 @@
$javapath = `which java`;
chomp $javapath;
+$slugtext = "/*\n * jQuery Mobile Framework : plugin to provide a simple popup (modal) or jQMdialog (page) Dialog widget.\n * Copyright (c) JTSage\n * CC 3.0 Attribution. May be relicensed without permission/notifcation.\n * https://github.com/jtsage/jquery-mobile-simpledialog\n */\n";
+
@files = (
'jquery.mobile.simpledialog.min.js',
'jquery.mobile.simpledialog.min.css');
@@ -28,6 +30,7 @@
print OUTFILE $last;
close OUTFILE;
print "BUILD FINISHED.\n";
+ do_slug("./jquery.mobile.simpledialog.min.js");
}
elsif ( $ARGV[0] eq 'check' ) {
$last = (stat "../js/jquery.mobile.simpledialog.js")[9];
@@ -76,6 +79,19 @@ sub show_usage {
print " check :-: Check build status of scripts\n\n";
}
+sub do_slug {
+ local @ARGV = ($_[0]);
+ local $^I = '.bac';
+ while(<>){
+ if ($. == 1) {
+ print "$slugtext$/";
+ print;
+ } else {
+ print;
+ }
+ }
+}
+
sub make_master {
print "Build :-: Compressed Script... ";
print "compressing... ";
View
@@ -0,0 +1,4 @@
+jQuery-Mobile-SimpleDialog
+==========================
+
+Demo Files.
View
@@ -10,12 +10,10 @@
<!-- NOTE: Script load order is significant! -->
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> >
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
- <script type="text/javascript" src="http://jquerymobile.com/demos/1.0b1/experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.js"></script>
- <script type="text/javascript" src="http://dev.jtsage.com/jQM-SimpleDialog/demos/extras.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/gpretty/prettify.js"></script>
<link type="text/css" href="http://dev.jtsage.com/gpretty/prettify.css" rel="stylesheet" />
View
@@ -10,12 +10,10 @@
<!-- NOTE: Script load order is significant! -->
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> >
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
- <script type="text/javascript" src="http://jquerymobile.com/demos/1.0b1/experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.js"></script>
- <script type="text/javascript" src="http://dev.jtsage.com/jQM-SimpleDialog/demos/extras.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/gpretty/prettify.js"></script>
<link type="text/css" href="http://dev.jtsage.com/gpretty/prettify.css" rel="stylesheet" />
View
@@ -10,12 +10,10 @@
<!-- NOTE: Script load order is significant! -->
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> >
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
- <script type="text/javascript" src="http://jquerymobile.com/demos/1.0b1/experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.js"></script>
- <script type="text/javascript" src="http://dev.jtsage.com/jQM-SimpleDialog/demos/extras.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/gpretty/prettify.js"></script>
<link type="text/css" href="http://dev.jtsage.com/gpretty/prettify.css" rel="stylesheet" />
View
@@ -1,24 +0,0 @@
-//set up the theme switcher on the homepage
-$('div').live('pagecreate', function(event) {
- if (!$(this).is('.ui-dialog')) {
- var appendEl = $(this).find('.ui-footer:last');
-
- if (!appendEl.length) {
- appendEl = $(this).find('.ui-content');
- }
-
- if (appendEl.is("[data-position]")) {
- return;
- }
-
- $('<a href="#themeswitcher" data-' + $.mobile.ns + 'rel="dialog" data-' + $.mobile.ns + 'transition="pop">Switch theme</a>').buttonMarkup({
- 'icon': 'gear',
- 'inline': true,
- 'shadow': false,
- 'theme': 'd'
- }).appendTo(appendEl.find('.ui-controlgroup')).wrap('<div class="jqm-themeswitcher">').bind("vclick", function() {
- $.themeswitcher();
- });
- }
-
-});
View
@@ -10,12 +10,10 @@
<!-- NOTE: Script load order is significant! -->
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> >
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
- <script type="text/javascript" src="http://jquerymobile.com/demos/1.0b1/experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.js"></script>
- <script type="text/javascript" src="http://dev.jtsage.com/jQM-SimpleDialog/demos/extras.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/gpretty/prettify.js"></script>
<link type="text/css" href="http://dev.jtsage.com/gpretty/prettify.css" rel="stylesheet" />
View
@@ -10,12 +10,10 @@
<!-- NOTE: Script load order is significant! -->
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> >
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
- <script type="text/javascript" src="http://jquerymobile.com/demos/1.0b1/experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.js"></script>
- <script type="text/javascript" src="http://dev.jtsage.com/jQM-SimpleDialog/demos/extras.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/gpretty/prettify.js"></script>
<link type="text/css" href="http://dev.jtsage.com/gpretty/prettify.css" rel="stylesheet" />
View
@@ -10,11 +10,10 @@
<!-- NOTE: Script load order is significant! -->
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> >
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.js"></script>
- <script type="text/javascript" src="http://dev.jtsage.com/jQM-SimpleDialog/demos/extras.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/gpretty/prettify.js"></script>
<link type="text/css" href="http://dev.jtsage.com/gpretty/prettify.css" rel="stylesheet" />
@@ -1,8 +1,8 @@
-/*
+ /*
* jQuery Mobile Framework : plugin to provide a simple popup (modal) or jQMdialog (page) Dialog widget.
* Copyright (c) JTSage
* CC 3.0 Attribution. May be relicensed without permission/notifcation.
- *
+ * https://github.com/jtsage/jquery-mobile-simpledialog
*/
(function($, undefined ) {
$.widget( "mobile.simpledialog", $.mobile.widget, {
View
@@ -0,0 +1,4 @@
+jQuery-Mobile-SimpleDialog
+==========================
+
+Misc test files, for development.

0 comments on commit 65773ba

Please sign in to comment.