BlueBox has recently added the Stripe Payment System to it's list of available payment methods/gateways.
A typical Pay Function would work like this:
Friday, August 22, 2014
Friday, August 15, 2014
jQuery Fixed Table Headers in BlueBox
A recent plugin added to BlueBox is Misha Koryak's FloatThread.
This allows you to fix the table header within a fixed-width div as follows:
<div style=width:1000px;height:300px;overflow:auto; id=reportwrapper>
<table width=100% cellpadding=5 cellspacing=1 bgcolor=silver id=report_table_pointer>
<thead>
<tr>
<th> .. some content here .. </th>
<th> .. some content here .. </th>
</tr>
</thead>
<tbody>
<tr>
<td> .. some content here .. </td>
<td> .. some content here .. </td>
</tr>
</tbody>
</table>
</div>
<script src=\"engine/3rdparty/jquery/table_headers/jquery.floatThead.min.js\"></script>
<script>
var float_headers = jQuery('#report_table_pointer');
float_headers.floatThead({
scrollContainer: function(table){
return table.closest('#reportwrapper');
}
});
</script>
<div style=width:1000px;height:300px;overflow:auto; id=reportwrapper>
<table width=100% cellpadding=5 cellspacing=1 bgcolor=silver id=report_table_pointer>
<thead>
<tr>
<th> .. some content here .. </th>
<th> .. some content here .. </th>
</tr>
</thead>
<tbody>
<tr>
<td> .. some content here .. </td>
<td> .. some content here .. </td>
</tr>
</tbody>
</table>
</div>
<script src=\"engine/3rdparty/jquery/table_headers/jquery.floatThead.min.js\"></script>
<script>
var float_headers = jQuery('#report_table_pointer');
float_headers.floatThead({
scrollContainer: function(table){
return table.closest('#reportwrapper');
}
});
</script>
Thursday, August 14, 2014
Redirect to Despatch Note after Auto-Generating Invoice
A new BlueBox setting has been installed which redirects the 'view' back to a despatch note after a debtors invoice has been auto-generated from it. The usual behaviour is for the end document to display the debtors invoice.
bb_sales_debtors_invoices->bbsetting_inv_show_dsp_after_add - if set to 1 (on) will trigger a redirect back to the despatch note automatically.
Monday, June 9, 2014
BlueBox2.0 document pagination templates
BlueBox2.0 includes pagination templates that display long documents in a paginated format.
It is now possible to specify the number of lines on the first page differently from the number of lines on the subsequent pages by simply splitting the line-count with a pipe | and specify page 1's count first followed by the count for page 2 onwards after that.
For example:
<!--:set:global|force_custom_templates_in_system_mode=1:-->
<!--paginate_document_lines=10|15-->
<!--paginate_document_runon_template=bb_sales_quotes-print_runon-->
<!--:class:bb_sales_quotes_items:viewlist_print|sales_quoteISbb_sales_quotesID=(#_id#) and _id>=(#pdl_start_row#) and _id<=(#pdl_end_row#):-->
It is now possible to specify the number of lines on the first page differently from the number of lines on the subsequent pages by simply splitting the line-count with a pipe | and specify page 1's count first followed by the count for page 2 onwards after that.
For example:
<!--:set:global|force_custom_templates_in_system_mode=1:-->
<!--paginate_document_lines=10|15-->
<!--paginate_document_runon_template=bb_sales_quotes-print_runon-->
<!--:class:bb_sales_quotes_items:viewlist_print|sales_quoteISbb_sales_quotesID=(#_id#) and _id>=(#pdl_start_row#) and _id<=(#pdl_end_row#):-->
Monday, June 2, 2014
Neater Table to CSV Exports in BlueBox2
Update:
BlueBox includes a javascript library and PHP function which automatically exports tabular data to CSV export by simply adding ".table2csv_export('table_id')." into the string above your <table id=table_id> tag.
This feature has existed for a few years, but has been updated now to improve trimming of the contents. The numbers and text snippets in each cell are now trimmed to perform more reliably in Excel.
BlueBox includes a javascript library and PHP function which automatically exports tabular data to CSV export by simply adding ".table2csv_export('table_id')." into the string above your <table id=table_id> tag.
This feature has existed for a few years, but has been updated now to improve trimming of the contents. The numbers and text snippets in each cell are now trimmed to perform more reliably in Excel.
Friday, May 2, 2014
Print to PDF quickly with BlueBox
For BlueBox PHP coders and HTML5 developers here is a handy shortcut to printing any page to pdf with a few characters: (url broken up for legibility)
<a href=
/?class=some_class
&method=some_method
&global[noincludes]=print
&global[send2pdf]=1>Print to PDF</a>
Easy as that :-)
<a href=
/?class=some_class
&method=some_method
&global[noincludes]=print
&global[send2pdf]=1>Print to PDF</a>
Easy as that :-)
Thursday, April 24, 2014
Creating bespoke ajax lookups in BlueBox
BlueBox includes a default ajax-lookup feature for lists of information. This provides a neat facility for any link-table lookups and works by simply naming your fields with a capital ID in the field name ie userISbb_usersID.
Sometimes you want to use your own ajax lookups and there is a quick bbsetting that allows you to override the standard lookup, called bbsetting_ajax_lookup_jsfunction.
If you enter your javascript replacement function name into this setting for the required module, it will use that function rather than the standard one, ie my_lookup_function
A hidden div is automatically created with an id 'div_{field_name}' whenever a field for that module is created, so you can hook your ajax lookup into that div and the text input field is automatically given the id 'viewer_{field_name}' - with these 2 id's you have the ingredients to build an ajax lookup.
Your javascript lookup would work this way:
function my_lookup_function(){
\$('div_global[fields][userISbb_usersID]').style.display='block';
ajax2div('div_global[fields][userISbb_usersID]','/?class=my_class&method=my_method&global[noincludes]=rawtext&global[srch_txt]='+$('viewer_global[fields][userISbb_usersID]').value);
}
In your my_class->my_method you would then search the module using $global[srch_txt] and return the results.
Sometimes you want to use your own ajax lookups and there is a quick bbsetting that allows you to override the standard lookup, called bbsetting_ajax_lookup_jsfunction.
If you enter your javascript replacement function name into this setting for the required module, it will use that function rather than the standard one, ie my_lookup_function
A hidden div is automatically created with an id 'div_{field_name}' whenever a field for that module is created, so you can hook your ajax lookup into that div and the text input field is automatically given the id 'viewer_{field_name}' - with these 2 id's you have the ingredients to build an ajax lookup.
Your javascript lookup would work this way:
function my_lookup_function(){
\$('div_global[fields][userISbb_usersID]').style.display='block';
ajax2div('div_global[fields][userISbb_usersID]','/?class=my_class&method=my_method&global[noincludes]=rawtext&global[srch_txt]='+$('viewer_global[fields][userISbb_usersID]').value);
}
In your my_class->my_method you would then search the module using $global[srch_txt] and return the results.
Subscribe to:
Posts (Atom)