Permalink
Browse files

Cleaning up, deprecating can.Control.view

  • Loading branch information...
1 parent 62b2637 commit 06b71ccfe19108b5fd04800898664f46ba177cbd @daffl daffl committed Dec 5, 2012
Showing with 48 additions and 9,450 deletions.
  1. +1 −1 build/make/all.js
  2. +0 −3 build/plugins.js
  3. +7 −0 changelog.md
  4. +1 −0 control/view/view.js
  5. +4 −1 control/view/view.md
  6. +18 −4 grunt.js
  7. +0 −9,440 lib/jquery.1.8.2.js
  8. +0 −1 test/plugin_test.js
  9. +17 −0 view/ejs/test/todo_comments.ejs
View
2 build/make/all.js
@@ -6,6 +6,6 @@ steal.config({
}
});
steal('can/util', 'can/construct/proxy', 'can/construct/super', 'can/control', 'can/control/plugin',
- 'can/view/mustache', /* 'can/control/view', */ 'can/view/modifiers', 'can/model', 'can/view/ejs',
+ 'can/view/mustache', 'can/view/modifiers', 'can/model', 'can/view/ejs',
'can/observe/attributes', 'can/observe/delegate', 'can/observe/setter',
'can/observe/validations', 'can/route', 'can/view/modifiers', 'can/observe/backup');
View
3 build/plugins.js
@@ -23,9 +23,6 @@ steal('steal/build/pluginify', 'can/build/settings.js', function () {
name : "control.plugin",
options : wrapjQuery
},
- "control/view/view" : {
- name : "control.view"
- },
"observe/attributes/attributes" : {
name : "observe.attributes"
},
View
7 changelog.md
@@ -1,3 +1,10 @@
+__1.1.3__
+
+- fix: [can.Control will fail to find $.event.special in a $.noConflict(true) scenario](https://github.com/bitovi/canjs/issues/191)
+- fix: [Nameless view renderers should return document fragment](https://github.com/bitovi/canjs/issues/195)
+- add: [Add can.Observe.List.prototype.replace](https://github.com/bitovi/canjs/issues/194)
+- add: [Return resolved data models in view callback](https://github.com/bitovi/canjs/issues/183)
+
__1.1.2__
- fix: [Solve issue when stealing mustache templates](https://github.com/bitovi/canjs/pull/175) - `can/view/mustache` returns `can` object now
View
1 control/view/view.js
@@ -66,6 +66,7 @@ steal('can/util', 'can/control', 'can/view',function(can) {
};
can.Control.prototype.view = function( view, data, myhelpers ) {
+ steal.dev.warn('can.Control.view is deprecated!');
//shift args if no view is provided
if ( typeof view != "string" && !myhelpers ) {
myhelpers = data;
View
5 control/view/view.md
@@ -1,9 +1,12 @@
-@page can.Control.view
+@page can.Control.view
+@hide
@parent can.Control
@plugin can/control/view
@test can/control/view/qunit.html
@download http://donejs.com/can/dist/can.control.view.js
+__DEPRECATED__
+
Renders a View template with the controller instance. If the first argument
is not supplied, it looks for a view in `/views/controlName/action_name.ejs`.
If data is not provided, it uses the controller instance as data.
View
22 grunt.js
@@ -3,7 +3,7 @@ module.exports = function (grunt) {
var _ = grunt.utils._;
var outFiles = {
edge : '<%= meta.out %>/edge/**/*.js',
- latest : '<%= meta.out %>/<%= pkg.version %>/**/*.js',
+ latest : '<%= meta.out %>/<%= pkg.version %>/**/*.js'
};
grunt.initConfig({
@@ -77,18 +77,32 @@ module.exports = function (grunt) {
}
},
downloads : '<json:build/downloads.json>',
- docco : _.extend({_options : {
+ docco : {
+ edge : {
+ src : '<%= meta.out %>/edge/**/*.js',
+ docco : {
+ output : '<%= meta.out %>/edge/docs'
+ }
+ },
+ latest : {
+ src : '<%= meta.out %>/<%= pkg.version %>/**/*.js',
+ docco : {
+ output : '<%= meta.out %>/<%= pkg.version %>/docs'
+ }
+ },
+ _options : {
exclude : [/\.min\./, /amd\//, /qunit\.js/]
}
- }, outFiles),
+ },
strip : outFiles,
bannerize : outFiles
});
grunt.loadTasks("../build/tasks");
- grunt.registerTask("edge", "build:edge build:edgePlugins strip:edge beautify:dist bannerize:edge");
+ grunt.registerTask("edge", "build:edge build:edgePlugins strip:edge beautify:dist docco:edge bannerize:edge");
grunt.registerTask("latest", "build:latest build:latestPlugins strip:latest beautify:dist bannerize:latest docco:latest");
grunt.registerTask("ghpages", "shell:cleanup shell:getGhPages shell:copyLatest shell:updateGhPages shell:cleanup");
grunt.registerTask("deploy", "latest ghpages shell:bundleLatest downloads");
+
};
View
9,440 lib/jquery.1.8.2.js
0 additions, 9,440 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1 test/plugin_test.js
@@ -10,7 +10,6 @@ steal('./setup.js').then(
, 'can/control/route/route_test.js'
, 'can/control/modifier/modifier_test.js'
, 'can/control/modifier/key/key_test.js'
- , 'can/control/view/test/qunit/view_test.js'
, 'can/util/fixture/fixture_test.js'
// TODO , 'can/control/modifier/modifier_test.js'
, function() {
View
17 view/ejs/test/todo_comments.ejs
@@ -0,0 +1,17 @@
+<!-- bind to changes in the todo list -->
+<% this.each(function( todo ) { %>
+ <!-- add the todo to the element's data -->
+ <li <%= (el) -> el.data('todo',todo) %>>
+ <!-- if the todo is complete, mark as checked -->
+ <input type="checkbox" class="complete"
+ <%= todo.attr('complete') ? 'checked' : '' %>>
+
+ <!-- if the todo is complete, add 'done' to the className -->
+ <span class="<%= todo.attr('complete') ? 'done' : '' %>">
+ <%= todo.attr('name') %>
+ </span>
+
+ <!-- a destroy link -->
+ <a href="javascript://" class='destroy'>X</a>
+ </li>
+<% }) %>

0 comments on commit 06b71cc

Please sign in to comment.