This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Font styles */ | |
.kn-content h3 { | |
color: #8f3181; | |
margin-top: 18px; | |
margin-bottom: 8px; | |
line-height: 160%; | |
font-size: 115%; | |
} | |
body .kn-content p { | |
line-height: 160%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this event handler will update a date/time field when a value is updated with inline editing | |
// change view_1 to the view key of the table with inline editing | |
$(document).on('knack-cell-update.view_1', function(event, view, data) { | |
// create a JS date object | |
var todayDate = new Date(); | |
todayDate.setHours(todayDate.getHours() - 7); // make any timezone changes | |
// create an object for the data to update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Change the view_1 to the key of your table view */ | |
/* Change the field_1 to the key of the field of the column you want to set */ | |
#view_1 th.field_1 { | |
width: 100px; /* width in pixels */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// api | |
var api_url = 'http://api.knackhq.com/v1/objects/object_1/records'; | |
// preparing filters | |
var filters = [ | |
{ | |
field: 'field_1', | |
operator: 'is', | |
value: 'test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Knack's version */ | |
#kn-app-menu ul { | |
background-color: #00396D; | |
} | |
/* Your custom gray version. Add a selector to prioritize */ | |
.kn-content #kn-app-menu ul { | |
background-color: #ccc; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"field_1": "Kelly and Cohen", | |
"field_16": "4347 Oak Street<br />Syracuse, NY 13202", | |
"field_17": { | |
"url": "http://www.kellycohen.com" | |
}, | |
"field_18": "Services", | |
"field_31": "315-296-4146" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"field_1": "Kelly and Cohen" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
field_1: "02/08/2013 to 02/11/2013", | |
field_1_raw: { | |
"date":"02/08/2013", | |
"to":{ | |
"date":"02/11/2013" | |
}, | |
"all_day":true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// change view_1 to the view you want to listen to | |
$(document).on('knack-record-update.view_1', function(event, view, record) { | |
// view is a json object of the form | |
// record is a json object of the record inserted by the view (form) | |
alert('updated a record for view: ' + view.key); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// change "view_1" to the view you want to listen for | |
$(document).on('knack-records-render.view_1', function(event, view, records) { | |
// handle scene | |
// view is a json object of the view | |
// records is an array of json objects of the records currently visible | |
alert('listener for records, # of records is: ' + records.length); | |
}); |
NewerOlder