Skip to content

Instantly share code, notes, and snippets.

@BriceShatzer
BriceShatzer / jsbin.awoyUZi.css
Created November 18, 2013 23:33
NYE Party RSVP app
section{
width:600px;
padding: 15px;
margin: 15px auto ;
border:2px #00a1ff solid;
border-radius: 8px;
background-color: #00a1ff;
color:#fff;
}
h1 {color:#fff;text-align: center;}
section{
width:600px;
padding: 15px;
margin: 15px auto ;
border:2px #00a1ff solid;
border-radius: 8px;
background-color: #00a1ff;
color:#fff;
}
h1 {color:#fff;text-align: center;}
@BriceShatzer
BriceShatzer / js
Last active January 4, 2016 09:29
WPD - doc tracking
// - orginal code
// worked but triggered pop block and would open in a new window instead of a new tab
$('a.docLink').click(function(event) {
event.preventDefault();
var documentURL = $(this).attr('href');
$.post (submissionURL, theInfo)
.always( function() {
var win=window.open(documentURL,'_blank');
@BriceShatzer
BriceShatzer / Notes
Last active August 29, 2015 13:56
Unlimited item list
Set up as an independent page that uses no template. It can be loaded in using
$.ajax({
url: "itemList.html",
success: function (data) {
//do what ever you want with the data
},
dataType: 'html'
});
//----- 1 -----
$.ajax({
url: '/path/to/file',
success: function(data){
//do something;
//do more stuff to with the something that was just done.
},
dataType: 'html'
});
//----------
$.when(
$.ajax({
url: '/path/to/file',
dataType: 'html'
}).done(function(data) {
//do stuff
});
$.ajax({
url: '/path/to/file2',
# regex for sublime - clearing out dreamweaver templating from BC pages
#find:
(?s).+<!-- InstanceBeginEditable name="ContentArea" -->(.+)<!-- InstanceEndEditable -->.+
#replace:
$1
@BriceShatzer
BriceShatzer / gist:9654902
Last active August 29, 2015 13:57
START Group Instructor Portal | Snippets
/* ----- building JSON objects out of training modules ----- */
// step 1 - add jQuery
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
//step 2 - add some handles
$('#subrightcol>div div').eq(2).attr('id', 'left');
$('#subrightcol>div div.training_completedInfo').attr('id', 'right');
//clearing out training items
//set Altair 4x checkbox & datetime
document.getElementById('ctl00_cp_cat125506cat430727cat3').checked = false
document.getElementById('ctl00_cp_cat125506cat430728cat4').value = ''
//set Altair 5x checkbox & datetime
document.getElementById('ctl00_cp_cat125506cat430729cat3').checked = false
document.getElementById('ctl00_cp_cat125506cat430730cat4').value = ''
A-1 CAT_Custom_380476_127022
A-1_date CAT_Custom_380477_127022
A-2 CAT_Custom_380479_127022
A-2_date CAT_Custom_380480_127022
A-3 CAT_Custom_380481_127022
A-3_date CAT_Custom_380483_127022
A-4 CAT_Custom_380485_127022
A-4_date CAT_Custom_380486_127022
A-5 CAT_Custom_380488_127022
A-5_date CAT_Custom_380489_127022