Permalink
Browse files

USE apprise from github

  • Loading branch information...
1 parent d301ce6 commit ea111d886ab6eafc84cd5e635a059e8ec69ac60f @lingo lingo committed Mar 23, 2012
Showing with 5 additions and 204 deletions.
  1. +3 −0 .gitmodules
  2. +1 −1 code/KickAssetAdmin.php
  3. +1 −0 javascript/apprise
  4. +0 −79 javascript/apprise/apprise.css
  5. +0 −124 javascript/apprise/apprise.js
View
@@ -0,0 +1,3 @@
+[submodule "javascript/apprise"]
+ path = javascript/apprise
+ url = git://github.com/lingo/Apprise.git
View
@@ -107,7 +107,7 @@ public function init() {
Requirements::css('kickassets/css/kickassets.css');
Requirements::javascript('kickassets/javascript/jquery.js');
Requirements::javascript(THIRDPARTY_DIR.'/jquery-livequery/jquery.livequery.js');
- Requirements::javascript('kickassets/javascript/apprise/apprise.js');
+ Requirements::javascript('kickassets/javascript/apprise/apprise-1.5.full.js');
Requirements::javascript('kickassets/javascript/jquery.tooltip.js');
Requirements::css('kickassets/javascript/apprise/apprise.css');
Requirements::javascript('kickassets/javascript/kickassets_ui.js');
Submodule apprise added at f916e9
@@ -1,79 +0,0 @@
-.appriseOverlay
- {
- position:fixed;
- top:0;
- left:0;
- background:rgba(0, 0, 0, 0);
- display:none;
- }
-.appriseOuter
- {
- background:#eee;
- border:1px solid #fff;
- box-shadow:0px 3px 7px #333;
- -moz-box-shadow:0px 3px 7px #333;
- -webkit-box-shadow:0px 3px 7px #333;
- -moz-border-radius:4px;
- -webkit-border-radius:4px;
- border-radius:4px;
- -khtml-border-radius:4px;
- position:absolute;
- z-index:99999999;
- min-width:400px;
- min-height:50px;
- max-width:75%;
- position:fixed;
- display:none;
- }
-.appriseInner
- {
- padding:20px;
- color:#333;
- text-shadow:0px 1px 0px #fff;
- }
-.appriseInner button
- {
- border:1px solid #bbb;
- -moz-border-radius:3px;
- -webkit-border-radius:3px;
- border-radius:3px;
- -khtml-border-radius:3px;
- background: -moz-linear-gradient(100% 100% 90deg, #eee, #d5d5d5);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eee), to(#d5d5d5));
- background: -webkit-linear-gradient(#eee, #d5d5d5);
- background: -o-linear-gradient(#eee, #d5d5d5);
- color:#232d3d;
- font-size:12px;
- font-weight:bold;
- padding:4px 10px;
- margin:0 3px;
- text-shadow:0px 1px 0px #fff;
- cursor:pointer;
- box-shadow:0px 1px 2px #ccc;
- -moz-box-shadow:0px 1px 2px #ccc;
- -webkit-box-shadow:0px 1px 2px #ccc;
- }
-.appriseInner button:hover
- {
- color:#d85054;
- }
-.aButtons, .aInput
- {
- margin:20px 10px 0px 10px;
- text-align:center;
- }
-.aTextbox
- {
- border:1px solid #aaa;
- -moz-border-radius:4px;
- -webkit-border-radius:4px;
- border-radius:4px;
- -khtml-border-radius:4px;
- box-shadow:0px 1px 0px #fff;
- -moz-box-shadow:0px 1px 0px #fff;
- -webkit-box-shadow:0px 1px 0px #fff;
- width:180px;
- font-size:12px;
- font-weight:bold;
- padding:5px 10px;
- }
@@ -1,124 +0,0 @@
-// Apprise 1.5 by Daniel Raftery
-// http://thrivingkings.com/apprise
-//
-// Button text added by Adam Bezulski
-//
-
-function apprise(string, args, callback)
- {
- var default_args =
- {
- 'confirm' : false, // Ok and Cancel buttons
- 'verify' : false, // Yes and No buttons
- 'input' : false, // Text input (can be true or string for default text)
- 'animate' : false, // Groovy animation (can true or number, default is 400)
- 'textOk' : 'Ok', // Ok button default text
- 'textCancel' : 'Cancel', // Cancel button default text
- 'textYes' : 'Yes', // Yes button default text
- 'textNo' : 'No' // No button default text
- }
-
- if(args)
- {
- for(var index in default_args)
- { if(typeof args[index] == "undefined") args[index] = default_args[index]; }
- }
-
- var aHeight = $(document).height();
- var aWidth = $(document).width();
- $('body').append('<div class="appriseOverlay" id="aOverlay"></div>');
- $('.appriseOverlay').css('height', aHeight).css('width', aWidth).fadeIn(100);
- $('body').append('<div class="appriseOuter"></div>');
- $('.appriseOuter').append('<div class="appriseInner"></div>');
- $('.appriseInner').append(string);
- $('.appriseOuter').css("left", ( $(window).width() - $('.appriseOuter').width() ) / 2+$(window).scrollLeft() + "px");
-
- if(args)
- {
- if(args['animate'])
- {
- var aniSpeed = args['animate'];
- if(isNaN(aniSpeed)) { aniSpeed = 400; }
- $('.appriseOuter').css('top', '-200px').show().animate({top:"100px"}, aniSpeed);
- }
- else
- { $('.appriseOuter').css('top', '100px').fadeIn(200); }
- }
- else
- { $('.appriseOuter').css('top', '100px').fadeIn(200); }
-
- if(args)
- {
- if(args['input'])
- {
- if(typeof(args['input'])=='string')
- {
- $('.appriseInner').append('<div class="aInput"><input type="text" class="aTextbox" t="aTextbox" value="'+args['input']+'" /></div>');
- }
- else
- {
- $('.appriseInner').append('<div class="aInput"><input type="text" class="aTextbox" t="aTextbox" /></div>');
- }
- $('.aTextbox').focus();
- }
- }
-
- $('.appriseInner').append('<div class="aButtons"></div>');
- if(args)
- {
- if(args['confirm'] || args['input'])
- {
- $('.aButtons').append('<button value="ok">'+args['textOk']+'</button>');
- $('.aButtons').append('<button value="cancel">'+args['textCancel']+'</button>');
- }
- else if(args['verify'])
- {
- $('.aButtons').append('<button value="ok">'+args['textYes']+'</button>');
- $('.aButtons').append('<button value="cancel">'+args['textNo']+'</button>');
- }
- else
- { $('.aButtons').append('<button value="ok">'+args['textOk']+'</button>'); }
- }
- else
- { $('.aButtons').append('<button value="ok">Ok</button>'); }
-
- $(document).keydown(function(e)
- {
- if($('.appriseOverlay').is(':visible'))
- {
- if(e.keyCode == 13)
- { $('.aButtons > button[value="ok"]').click(); }
- if(e.keyCode == 27)
- { $('.aButtons > button[value="cancel"]').click(); }
- }
- });
-
- var aText = $('.aTextbox').val();
- if(!aText) { aText = false; }
- $('.aTextbox').keyup(function()
- { aText = $(this).val(); });
-
- $('.aButtons > button').click(function()
- {
- $('.appriseOverlay').remove();
- $('.appriseOuter').remove();
- if(callback)
- {
- var wButton = $(this).attr("value");
- if(wButton=='ok')
- {
- if(args)
- {
- if(args['input'])
- { callback(aText); }
- else
- { callback(true); }
- }
- else
- { callback(true); }
- }
- else if(wButton=='cancel')
- { callback(false); }
- }
- });
- }

0 comments on commit ea111d8

Please sign in to comment.