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
<script> | |
jQuery('#forcast_month_selector').submit(function() { | |
jQuery('#generateresult').fadeIn(); | |
ajax('{{=URL("ces", "populate", vars=dict(type="forecast"))}}', | |
['forecast_month'], 'generateresult'); | |
return false; | |
}); | |
</script> |
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
<snippet> | |
<content><![CDATA[$SELECTION._enable_record_versioning( | |
archive_db=${1: archive_db}, | |
archive_name='${2: archive_table}_archive', | |
current_record='current_record', | |
is_active='is_active')]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<!-- <tabTrigger>hello</tabTrigger> --> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> |
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
FieldsToUpdate = ['cost_center', 'group1', 'wbs'] | |
Fields = [Teams.cost_center, Groups.group_name, WbsList.wbs_code] | |
FieldsDict = {'cost_center': Teams.cost_center, 'group1': Groups.group_name, 'wbs': WbsList.wbs_code} | |
DbTableLinks = itmoney_db((Groups.sdu_id == Sdus.id) & (Groups.id == Teams.group_id) & (WbsList.team_id == Teams.id) & (WbsList.customer_id == Customers.id) & ((Projects.wbs_bud == WbsList.id) | (Projects.wbs_deb == WbsList.id) | (Projects.wbs_pecs == WbsList.id)) & (Customers.partner_company_id == PartnerCompanies.id)) | |
DbData = DbTableLinks.select(*FieldsDict.values()) | |
UpdateDict = {} | |
for item in DbData: | |
x = item[FieldsDict['cost_center']] | |
for k in FieldsDict.keys(): | |
UpdateDict[k] = item[FieldsDict[k]] |
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
<script> | |
$('#TableID or Class').dataTable({ | |
"bPaginate": false, | |
"aaSorting": [[ 1, "asc" ]] | |
}) | |
</script> |
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
_style="width: auto; white-space: nowrap" |
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
<script> | |
(function($) { | |
$.fn.toggleReadonly = function() { | |
return this.each(function() { | |
var $this = $(this); | |
if ($this.attr('readonly')) $this.removeAttr('readonly'); | |
else $this.attr('readonly', 'readonly'); | |
}); | |
}; | |
})(jQuery); |
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
def do_something_with(form): | |
... | |
return | |
SQLFORM.grid(....,oncreate=lambda form: do_something_with(form)) | |
SQLFORM.grid(....,onupdate=lambda form: do_something_with(form)) |
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
<script> | |
$('input[type="radio"]').on('click change', function(e) { | |
ajax("{{=URL('default', 'avaya_match_report')}}", ['criteria'], "reportresult") | |
console.log(e.type); | |
}); | |
</script> |
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
<script> | |
$(function () { | |
$('#myTab a:first').tab('show'); | |
// Javascript to enable link to tab | |
// var url = document.location.toString(); | |
// if (url.match('#')) { | |
// $('.nav-tabs a[href=#'+url.split('#')[1]+']').tab('show') ; | |
// window.scrollTo(0, 0); | |
// } |