Compare commits
2 Commits
develop
...
swipe-gest
Author | SHA1 | Date |
---|---|---|
John McLear | 79e684ac34 | |
John McLear | 040dc78df9 |
|
@ -15,6 +15,7 @@
|
|||
, "pad_connectionstatus.js"
|
||||
, "chat.js"
|
||||
, "gritter.js"
|
||||
, "hammer.js"
|
||||
, "$tinycon/tinycon.js"
|
||||
, "excanvas.js"
|
||||
, "farbtastic.js"
|
||||
|
|
|
@ -18,6 +18,7 @@ var padutils = require('./pad_utils').padutils;
|
|||
var padcookie = require('./pad_cookie').padcookie;
|
||||
var Tinycon = require('tinycon/tinycon');
|
||||
var hooks = require('./pluginfw/hooks');
|
||||
var Hammer = require('./hammer');
|
||||
|
||||
var chat = (function()
|
||||
{
|
||||
|
@ -149,6 +150,7 @@ var chat = (function()
|
|||
$("#chatcounter").text(count);
|
||||
|
||||
if(!chatOpen) {
|
||||
|
||||
$.gritter.add({
|
||||
// (string | mandatory) the heading of the notification
|
||||
title: ctx.authorName,
|
||||
|
@ -157,7 +159,15 @@ var chat = (function()
|
|||
// (bool | optional) if you want it to fade out on its own or just sit there
|
||||
sticky: ctx.sticky,
|
||||
// (int | optional) the time you want it to be alive for before fading out
|
||||
time: '4000'
|
||||
time: '4000',
|
||||
// after open allow it to be swiped
|
||||
after_open: function(e){
|
||||
var gritterNotification = document.getElementById(e.context.id);
|
||||
var hammertime = new Hammer(gritterNotification);
|
||||
hammertime.on("swiperight", function(ev){
|
||||
$(gritterNotification).fadeOut();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -48,7 +48,6 @@ var createCookie = require('./pad_utils').createCookie;
|
|||
var readCookie = require('./pad_utils').readCookie;
|
||||
var randomString = require('./pad_utils').randomString;
|
||||
var gritter = require('./gritter').gritter;
|
||||
|
||||
var hooks = require('./pluginfw/hooks');
|
||||
|
||||
function createCookie(name, value, days, path){ /* Warning Internet Explorer doesn't use this it uses the one from pad_utils.js */
|
||||
|
@ -937,4 +936,3 @@ exports.handshake = handshake;
|
|||
exports.pad = pad;
|
||||
exports.init = init;
|
||||
exports.alertBar = alertBar;
|
||||
|
||||
|
|
Loading…
Reference in New Issue