Permalink
Commits on Jan 21, 2017
  1. addPublic accepts multiple arguments and array arguments; permissions…

    … checks for pieces no longer check for req.user, checking permissions is sufficient and makes addPublic more useful
    boutell committed Jan 21, 2017
Commits on Jan 19, 2017
  1. Merge pull request #795 from punkave/feature/indexby-helper-adjustments

    Adjust documentation and param
    boutell committed on GitHub Jan 19, 2017
Commits on Jan 18, 2017
  1. 2.14.3: the ajax mechanism to preserve text fields should not preserv…

    …e checkboxes, radio buttons and submit buttons.
    stuartromanek committed Jan 18, 2017
Commits on Jan 17, 2017
  1. Add underscore

    austinstarin committed Jan 17, 2017
Commits on Jan 13, 2017
  1. Merge pull request #791 from punkave/fix-trash-slugs

    fix trash slugs, #385; also guarantee uniqueness
    boutell committed on GitHub Jan 13, 2017
Commits on Jan 12, 2017
  1. Merge pull request #784 from punkave/dev-sourcemaps

    sourcemaps in dev
    austinstarin committed on GitHub Jan 12, 2017
Commits on Jan 11, 2017
  1. 2.14.1

    * The `apos.utils.clonePermanent` method no longer turns objects into long arrays of nulls if they happen to have a `length` property. `lodash` uses the `length` property as an indicator that the object should be treated as an array, but this would be an unrealistic restriction on Apostrophe schema field names. Instead, `clonePermanent` now uses `Array.isArray` to distinguish true arrays. This fixes a nasty bug when importing content from A1.5 and subsequently editing it.
    
    * When a user is logged in there is an `apos.user` object on the browser side. Due to a bug this was an empty object. It now contains `title`, `_id` and `username` properties as intended.
    boutell committed Jan 11, 2017
  2. 2.14.1

    * The `apos.utils.clonePermanent` method no longer turns objects into long arrays of nulls if they happen to have a `length` property. `lodash` uses the `length` property as an indicator that the object should be treated as an array, but this would be an unrealistic restriction on Apostrophe schema field names. Instead, `clonePermanent` now uses `Array.isArray` to distinguish true arrays. This fixes a nasty bug when importing content from A1.5 and subsequently editing it.
    
    * When a user is logged in there is an `apos.user` object on the browser side. Due to a bug this was an empty object. It now contains `title`, `_id` and `username` properties as intended.
    boutell committed Jan 11, 2017
Commits on Jan 9, 2017
  1. Merge pull request #786 from punkave/browser-side-user-object-fix

    currently if a user is logged in, apos.user exists in browser side ja…
    austinstarin committed on GitHub Jan 9, 2017
  2. currently if a user is logged in, apos.user exists in browser side ja…

    …vascript but it is an empty object. This is a bug. Fixed to include title, _id and username.
    boutell committed Jan 9, 2017
Commits on Jan 6, 2017
  1. 2.14.0:

    All tests passing.
    
    * A version rollback dialog box for the `global` doc is now opened if an element with the `data-apos-versions-global` attribute is clicked. There is currently no such element in the standard UI but you may introduce one in your own layout if you have mission-critical content in the `global` doc that is awkward to recreate after an accidental deletion, such as a custom sitewide nav.
    * An error message is correctly displayed when login fails.
    * Many UI messages are now passed through the `__()` internationalization helper correctly. Thanks to `timaebi`.
    boutell committed Jan 6, 2017
Commits on Dec 27, 2016
  1. sourcemaps in dev

    boutell committed Dec 27, 2016
  2. Merge pull request #783 from timaebi/master

    #771 made static texts translatable
    
    Thanks! Going to accept this and then clean up the login one a little to do the translation in the template where req is available and the language is actually known.
    boutell committed on GitHub Dec 27, 2016
  3. #771 made static texts translatable

    Tim Aebi committed Dec 27, 2016
Commits on Dec 22, 2016
  1. 2.13.2: the `data-apos-ajax-context` feature had a bug which prevente…

    …d ordinary anchor links from performing AJAX refreshes correctly.
    boutell committed Dec 22, 2016
  2. 2.13.1: The `apostrophe-attachments` module now calls `apos.ui.busy` …

    …correctly on the fieldset so that the busy and completed indicators are correctly shown and hidden. Previously the string `0` was passed, which is not falsy.
    boutell committed Dec 22, 2016
Commits on Dec 21, 2016
  1. 2.13.0: configuring an absolute "baseUrl" for your site to improve fa…

    …cebook og:meta tags, newsletter generation by tasks, etc. works better.
    
    * `req.baseUrl` is now also available as `req.data.baseUrl`.
    * `req.baseUrlWithPrefix` and `req.data.baseUrlWithPrefix` have been added.
    * `req.absoluteUrl` is also available as `req.data.absoluteUrl`.
    * The `apostrophe-express` module correctly reads `baseUrl` from the global options of Apostrophe, not its own options; it is accepted from its own options for bc but for the full benefit you should set it globally.
    * The `req` objects returned by `apos.tasks.getReq()` now include these properties, and you can pass `{ url: '/some-relative-url' }` if you want the `absoluteUrl` property to be based on a particular URL within the site. This is also used for unit testing.
    * Unit tests no longer pass the meaningless `hostName` global option.
    * Unit tests added for the above.
    boutell committed Dec 21, 2016
Commits on Dec 15, 2016
  1. 2.12.0

    * Developers are no longer required to set `instantiate: false` in `app.js` when configuring an npm module that uses the `improve` property to implicitly subclass and enhance a different module. In addition, bugs were fixed in the underlying `moog-require` module to ensure that assets can be loaded from the `public` and `views` folders of modules that use `improve`.
    * `string` has replaced `csv` as the property name of the schema field converters that handle plaintext. Backwards compatibility has been implemented so that existing `csv` converters will work transparently and calls to `convert` with `csv` as the `from` argument still work as well. In all new custom field types you should say `string` rather than `csv`. There is no change in the functionality or implementation other than the name.
    boutell committed Dec 15, 2016
  2. Merge pull request #780 from punkave/no-more-instantiate-false-for-im…

    …prove
    
    the instantiate: false property is no longer required when using impr…
    boutell committed on GitHub Dec 15, 2016
  3. the instantiate: false property is no longer required when using impr…

    …ove, also depend on a newer moog-require that has proper behavior for asset chains and autoloading with improve
    boutell committed Dec 15, 2016
  4. Merge pull request #778 from punkave/rename-csv-to-string

    the "from" argument to convert could previously be set to either "for…
    agilbert committed on GitHub Dec 15, 2016
  5. explicitly change "csv" to "string" in convert calls to illustrate wh…

    …at is happening although we also have the converters aliased under the other name
    boutell committed Dec 15, 2016
  6. I had reverted this one as a test of the bc for adding field types an…

    …d forgot to switch it back to string
    boutell committed Dec 15, 2016
  7. the "from" argument to convert could previously be set to either "for…

    …m" or "csv". "form" is the Apostrophe-specific format used by our APIs and is not changing. "csv" was a misnomer because it really meant "a plain text representation" (as typically but not always found in a CSV file). There is full bc with code that adds custom schema field types with "csv" converters, and unit test coverage of same.
    boutell committed Dec 15, 2016
Commits on Dec 9, 2016
  1. 2.11.0

    All tests passing.
    
    You can now add middleware to your Apostrophe site via any module in your project. Just add an `self.expressMiddleware` method to your module, which takes the usual `req, res, next` arguments. Or, if it's more convenient, set `self.expressMiddleware` to an array of such functions. "Module middleware" is added immediately after the minimum required Apostrophe middleware (bodyParser, `req.data`, etc), and before any routes.
    boutell committed Dec 9, 2016
  2. Merge pull request #774 from punkave/module-middleware

    support for middleware in any module via an `expressMiddleware` prope…
    boutell committed on GitHub Dec 9, 2016
  3. support for middleware in any module via an `expressMiddleware` prope…

    …rty, which may be a middleware function or an array of them. The middleware is run right after the required base middleware, such as bodyParser and the creation of req.data, and before everything else, including all routes
    boutell committed Dec 9, 2016
Commits on Dec 8, 2016
  1. 2.10.3

    Fixed bug in `autoPreserveText` feature of our `data-apos-ajax-context` mechanism; also, restricted it to text inputs and textareas that actually have the focus so that you can replace their values normally at other times
    boutell committed Dec 8, 2016
  2. Fixed bug in `autoPreserveText` feature of our AJAX mechanism; restri…

    …cted it to text inputs that actually have the focus so that you can replace their values normally at other times
    boutell committed Dec 8, 2016