Skip to content

Instantly share code, notes, and snippets.

@amitrogye
amitrogye / gist:7817316
Created December 6, 2013 01:49
SNC: Gliderecord
var gr = new GlideRecord("myTable");
gr.addQuery("name", "value");
gr.query();
if (gr.next()) {
}
@amitrogye
amitrogye / sncsublimehelper.js
Created December 6, 2013 02:18
sncsublimehelper
window.bookmarklet = function(opts) {
fullFunc(opts)
};
// These are the styles, scripts and callbacks we include in our bookmarklet:
window.bookmarklet({
css: ['https://gist.github.com/amitrogye/7817587/raw/82e387657a00eec730c9e61fd6200a40de774479/vanillabox.css'],
js: ['https://gist.github.com/amitrogye/7817595/raw/d2a969b0dd2c7fd6dbf848acdb99a9515cb9ca1a/jquery.vanillabox-0.1.3.min.js'],
// jqpath : 'myCustomjQueryPath.js', <-- option to include your own path to jQuery
@amitrogye
amitrogye / vanillabox.css
Created December 6, 2013 02:22
vanillaboxcss
/*
* Vanillabox
* (C) 2013 cocopon.
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*/
.vnbx * {
box-sizing: content-box;
-moz-box-sizing: content-box;
@amitrogye
amitrogye / jquery.vanillabox-0.1.3.min.js
Created December 6, 2013 02:23
jquery.vanillabox-0.1.3.min
(function($){/*
Vanillabox
(C) 2013 cocopon.
Licensed under the MIT license:
http://www.opensource.org/licenses/mit-license.php
*/
var d;function g(){}function k(a){return void 0!==a}function l(a){function b(){}b.prototype=m.prototype;a.prototype=new b}function n(a,b){var c=a.length,e;for(e=0;e<c;e++)b.call(this,a[e],e)}function q(a,b){var c=[],e=a.length,f;for(f=0;f<e;f++)c.push(b.call(this,a[f],f));return c}function r(){var a=new $.Deferred;setTimeout(function(){a.resolve()},0);return a.promise()}function s(){return!!navigator.userAgent.match(/(ipod|iphone|ipad)/ig)};function t(){};var u={pa:function(a){return a.a.show()},$:function(a){return a.a.hide()},oa:function(a){u.N(a);return a.a.show()},Z:function(a){return a.a.hide()},N:function(a){var b=a.f,c=b.o(),e=v(a,c);b.a.css({width:c.width,height:c.height});a.a.css({left:e.left,top:e.top});return r()},na:function(a){return a.a.show()},Y:function(a){return a.a.hide()}},w={pa:function(a){return a.a.fadeIn(200)},$:function(a){return a.a.fadeOut(300)},sa:f
@amitrogye
amitrogye / jquery.popupoverlay.js
Created December 6, 2013 02:44
jquery.popupoverlay
/*!
* jQuery Popup Overlay
*
* @version 1.6.0
* @requires jQuery v1.7.1+
* @link http://vast-eng.github.com/jquery-popup-overlay/
*/
(function ($) {
var $window = $(window);
@amitrogye
amitrogye / jquery-2.0.3.min.js
Created December 6, 2013 04:04
jquery-2.0.3.min
/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-2.0.3.min.map
*/
(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1
@amitrogye
amitrogye / zebra_dialog.js
Created December 6, 2013 04:23
zebra_dialog
(function(c){c.Zebra_Dialog=function(g,p){var u={animation_speed_hide:250,animation_speed_show:0,auto_close:!1,buttons:!0,center_buttons:!1,custom_class:!1,keyboard:!0,max_height:0,message:"",modal:!0,overlay_close:!0,overlay_opacity:".9",position:"center",reposition_speed:500,show_close_button:!0,source:!1,title:"",type:"information",vcenter_short_message:!0,width:0,onClose:null},a=this,k={},q;a.settings={};"string"==typeof g&&(k.message=g);if("object"==typeof g||"object"==typeof p)k=c.extend(k, "object"==typeof g?g:p);a.init=function(){var d;a.settings=c.extend({},u,k);a.isIE6="explorer"==m.name&&6==m.version||!1;a.settings.modal&&(a.overlay=jQuery("<div>",{"class":"ZebraDialogOverlay"}).css({position:a.isIE6?"absolute":"fixed",left:0,top:0,opacity:a.settings.overlay_opacity}),a.settings.overlay_close&&a.overlay.bind("click",function(){a.close()}),a.overlay.appendTo("body"));a.dialog=jQuery("<div>",{"class":"ZebraDialog"+(a.settings.custom_class?" "+a.settings.custom_class:"")}).css({position:a.isIE6? "abso
@amitrogye
amitrogye / zebra_dialog.css
Created December 6, 2013 04:27
zebra_dialog_css
.ZebraDialog *,
.ZebraDialog *:after,
.ZebraDialog *:before { -moz-box-sizing: content-box !important; -webkit-box-sizing: content-box !important; box-sizing: content-box !important }
.ZebraDialog {
width: 350px;
z-index: 1001;
}
.ZebraDialog,
@amitrogye
amitrogye / sncsublimehelper_1.js
Created December 6, 2013 04:54
sncsublimehelper_1
window.bookmarklet = function(opts) {
fullFunc(opts)
};
// These are the styles, scripts and callbacks we include in our bookmarklet:
window.bookmarklet({
css: ['https://gist.github.com/amitrogye/7818568/raw/5a01c375673572fc0a4e704e2a4e35ca753bf6ff/zebra_dialog.css'],
js: ['https://gist.github.com/amitrogye/7818521/raw/4f27f1b64ece3537ddab27fa3255d87eae353edb/zebra_dialog.js'],
// jqpath : 'myCustomjQueryPath.js', <-- option to include your own path to jQuery
var SubststitutionHelper = Class.create();
SubststitutionHelper.prototype = {
initialize: function(record) {
this.log = new GSLog("intuit.custom.debug.level", this.type);
this.record = record;
// preload variables for request item
this.variables = {};
if(this.record.getTableName() == 'sc_req_item'){
this.preloadVariables();
}