apostrophe
Advanced tools
Comparing version 0.4.31 to 0.4.32
{ | ||
"name": "apostrophe", | ||
"version": "0.4.31", | ||
"version": "0.4.32", | ||
"description": "Apostrophe is a user-friendly content management system. This core module of Apostrophe provides rich content editing and essential facilities to integrate Apostrophe into your Express project. Apostrophe also includes simple facilities for storing your rich content areas in MongoDB and fetching them back again. Additional functionality is available in modules like apostrophe-pages, apostrophe-snippets, apostrophe-blog, apostrophe-events, apostrophe-twitter and apostrophe-rss.", | ||
@@ -5,0 +5,0 @@ "main": "apostrophe.js", |
@@ -439,8 +439,5 @@ /* jshint undef: true */ | ||
var $el = apos.fromTemplate(sel); | ||
console.log(sel); | ||
console.log($el.length); | ||
// It's not uncommon to have duplicates of a template that hasn't | ||
// been overridden for a derived type yet. Behave well in this case | ||
$el = $el.filter(':first'); | ||
console.log($el[0]); | ||
@@ -582,2 +579,27 @@ // Make sure they can provide their own afterHide | ||
// KEEP IN SYNC WITH SERVER SIDE VERSION IN apostrophe.js | ||
// | ||
// Convert a name to camel case. Only digits and ASCII letters remain. | ||
// Anything that isn't a digit or an ASCII letter prompts the next character | ||
// to be uppercase. Useful in converting CSV with friendly headings into | ||
// sensible property names | ||
apos.camelName = function(s) { | ||
var i; | ||
var n = ''; | ||
var nextUp = false; | ||
for (i = 0; (i < s.length); i++) { | ||
var c = s.charAt(i); | ||
if (c.match(/[A-Za-z0-9]/)) { | ||
if (nextUp) { | ||
n += c.toUpperCase(); | ||
nextUp = false; | ||
} else { | ||
n += c.toLowerCase(); | ||
} | ||
} else { | ||
nextUp = true; | ||
} | ||
} | ||
return n; | ||
}; | ||
@@ -684,8 +706,8 @@ // Convert everything else to a hyphenated css name. Not especially fast, | ||
apos.padInteger = function(i, places) { | ||
var s = i + ''; | ||
while (s.length < places) { | ||
s = '0' + s; | ||
} | ||
return s; | ||
}; | ||
var s = i + ''; | ||
while (s.length < places) { | ||
s = '0' + s; | ||
} | ||
return s; | ||
}; | ||
@@ -692,0 +714,0 @@ // MINOR JQUERY EXTENSIONS |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4213404
17377