-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usage of general jQueryUI Plugins #1
base: master
Are you sure you want to change the base?
Changes from 1 commit
6dc138a
0a0f979
5ab84ba
17384f9
d5af136
bfc6477
ebe09bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,13 @@ JQ.Widget = Em.Mixin.create({ | |
|
||
// Create a new instance of the jQuery UI widget based on its `uiType` | ||
// and the current element. | ||
var ui = jQuery.ui[this.get('uiType')](options, this.get('element')); | ||
|
||
|
||
var namespace = this.get('uiNamespace') || 'ui'; //the included jQuery UI widgets use the 'ui' namespace, ohter jQuery UI plugins may (or rather should) use their own namespace | ||
|
||
jQuery(this.get('element'))[this.get('uiType')](options); //create widget | ||
var ui = jQuery(this.get('element')).data("ui-"+this.get('uiType')) ;//save instance | ||
|
||
|
||
// Save off the instance of the jQuery UI widget as the `ui` property | ||
// on this Ember view. | ||
this.set('ui', ui); | ||
|
@@ -38,7 +43,10 @@ JQ.Widget = Em.Mixin.create({ | |
this.removeObserver(prop, observers[prop]); | ||
} | ||
} | ||
ui._destroy(); | ||
|
||
|
||
//ui._destroy(); this is private, so we better use | ||
ui.destroy(); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch |
||
}, | ||
|
||
|
@@ -188,6 +196,9 @@ App.ProgressBarView = JQ.ProgressBarView.extend({ | |
// list of people. Because our template binds the JQ.MenuView to this | ||
// value, it will automatically populate with the new people and | ||
// refresh the menu. | ||
|
||
console.log("epic stuff happened"); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oops. sorry. |
||
this.set('controller.people', [ | ||
Em.Object.create({ | ||
name: "Tom DAAAAALE" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like this variable is ever used. Is there something missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
var ui = jQuery(this.get('element')).data(namespace+"-"+this.get('uiType')) ;//save instance
..."namespace"+"-" in that line