Skip to content

Instantly share code, notes, and snippets.

public function select($options=array()) {
$pk = $this->getPk();
if(is_string($options) || is_numeric($options)) {
// 根据主键查询
if(strpos($options,',')) {
$where[$pk] = array('IN',$options);
}else{
$where[$pk] = $options;
}
$options = array();
Object.defineProperty(instance, key, {
get: function () {
return opts.data[key];
},
set: function (val) {
if (Model.allProperties[key].key === true && opts.data[key] != null) {
return;
}
if (!setInstanceProperty(key, val)) {
@wsk3201
wsk3201 / gist:8555039
Created January 22, 2014 07:58
Add bootstrap style to Backgrid.Paginator
var Paginator = Backgrid.Extension.Paginator = Backgrid.Extension.Paginator.extend({
render: function(){
Paginator.__super__.render.apply(this,arguments);
this.$el.find('ul').addClass('pagination');
return this;
}
});