Skip to content

Instantly share code, notes, and snippets.

<!--- Verify that the treatmentplan creates successfully --->
<cfif treatmentplan.save()>
<!--- Loop through all the patient's teeth --->
<cfloop collection="#params.as_values_treatmentplandetail.treatment#" item="tooth">
<!--- Loop through all the treatment plans selected --->
<cfloop list="#params.as_values_treatmentplandetail.treatment[tooth]#" index="treatmentId">
<!--- Find the selected treatment (HUGE DB IMPACT) --->
<cfset treatment = model("Treatment").findByKey(treatmentId)>
<!--- Insert a new treatment detail in the plan --->
<cfset treatmentplan.createTreatmentPlanDetail(toothId=tooth, treatment=treatment.name, price=treatment.price)>
Component [controllers.Pages] has no acessible Member with name [WHEELS]
Stacktrace The Error Occurred in
/Users/raulriera/Desktop/FuseGrid SDK/workspace/default/plugins/provides/Provides.cfc: line 228
226:
227: <cffunction name="$checkSetApplicationScope" access="public" output="false" returntype="void">
228: <cfargument name="controller" required="false" type="string" default="#variables.wheels.name#" />
229: <cfargument name="action" required="false" type="string" default="" />
230: <cfscript>
<cfcomponent output="false">
<cffunction name="init" access="public" output="false" returntype="any">
<cfset this.version = "0.9.3,1.0,1.1">
<cfreturn this />
</cffunction>
<cffunction name="l" returntype="any" output="false" access="public" hint="Shortcut method to 'localize'">
<cfargument name="text" type="string" required="true" hint="Text to localize" />
// RATER MODULE for Appcelerator Titanium
/*
WHAT IS IT:
Create a cycling reminder to go rate your app at the App Store. Tracks
the app launch count, and reminds the user every 20 launches (configurable) to
rate the app, with a click to launch the app page in the App Store.
Reminders stop if the user clicks the "Rate Now" or "Don't Remind Me" options.
USAGE:
@raulriera
raulriera / Local Notification
Created July 24, 2011 20:43
How is this done?
var notification = Ti.App.iOS.scheduleLocalNotification({
alertBody: "Body message",
alertAction: "Ok",
repeat: "daily",
date: new Date().getTime()
});
@raulriera
raulriera / gist:1239923
Created September 24, 2011 22:01
Local Notification
// This piece of code makes the notification run "once" after 3 seconds of calling the
// function, but it SHOULD re appear the next day and so on right? it doesn't
(function() {
app.model.scheduleLocalNotification = function() {
// Set the target date
var d = new Date();
@raulriera
raulriera / gist:1249818
Created September 29, 2011 02:10
Why is this test failing? the same test with users is passing
test "should create patient" do
assert_difference('Patient.count') do
post :create, patient: @new_patient
end
assert_redirected_to patient_path(assigns(:patient))
end
@raulriera
raulriera / PagingControl.js
Created April 19, 2012 02:13
Custom paging control for scrollableViews for Titanium Appcelerator
// I was unhappy about there was close to no control over the "pageControl"
// in scrollableViews, so I hacked my own
// -----
// Configuration
var pageColor = "#c99ed5";
PagingControl = function(scrollableView){
var container = Titanium.UI.createView({
height: 60
@raulriera
raulriera / LoadingTableViewRow.js
Created August 20, 2012 13:31
Loading indicador for tableviews in Titanium Appcelerator
LoadingTableViewRow = function(message) {
var row = Titanium.UI.createTableViewRow({
height: 70,
touchEnabled: false
});
var indicator = Titanium.UI.createActivityIndicator({
width:"auto",
height: 30,
color: "665b5b",
@raulriera
raulriera / DialogWindow.js
Created September 9, 2012 11:08
CustomAlertDialog commonJS module for Titanium Appcelerator. Similar to the "Tweetbot" (but will need more makeup of course) where the information is displayed below the title bar instead of an intrusive popup
DialogWindow = function(message, type){
// Default params
var message = message || "How about you add some message to this? :)";
var type = type || "error";
var window = Titanium.UI.createWindow({
width: 320,
height: 44,
top: 44,