This file contains hidden or 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
| function(response, status, xhr) { | |
| if (checkResponse(xhr) === 'json') { | |
| // call error handler | |
| if (response.success !== true) { | |
| that.get('errorHandler').check(response); | |
| } | |
| // check whether there is a message |
This file contains hidden or 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
| /* non-form JSON request success, no error no data / TODO: Dont show anything */ | |
| { | |
| status: 0, | |
| data: {} | |
| } | |
| /* non-form JSON request success, has data, no error / TODO: Show the data */ | |
| { | |
| status: 0, | |
| data: { |
This file contains hidden or 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
| /* | |
| * data structure: | |
| * { status: 0, data:{}} | |
| * { status: 0, data:{}, message: "you did something" } | |
| * { status: 1, data:{}, message: "you did something" } | |
| * { status: 1, data:{}} | |
| * { status: 2, data:{response:{data:{form:{global:'something going wrong'}}}}} | |
| * { status: 2, data:{response:{data:{form:{global:'error'}}}}, message: "you did something" } | |
| * { status: 2, data:{response:{data:{form:{global:'error'}}}}, message: "you did something" } | |
| * { status: 2, data:{response:{data:{form:{global:'error'}}}}, message: "you did something" } |
This file contains hidden or 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
| # Output: | |
| # /projects/zidaya: TURPAR-801 $ | |
| function svn_branch () { | |
| svn info | grep '^URL:' | egrep -o '(tags|branches)/[^/]+|trunk' | egrep -o '[^/]+$' | |
| } | |
| function pretty_prompt () { | |
| _IFS=$IFS; | |
| DIR=`pwd|sed -e "s|$HOME|~|"`; |
NewerOlder