3Dgoo cd8904e045 Fixing button destroy bug
When you want to add a button to the CMS but don't want LeftAndMain to apply jQuery UI button to it we add the `data-button="true"` attribute to our button. 

The `onadd` function checks that this attribute does not exist before calling `this.button()`.

The `onremove` incorrectly checks that this attribute does exist before calling `this.button('destroy')`. This should be checking that this attribute does not exist, just like the `onadd` function.

What this causes is when you have a button with the `data-button` attribute a button is not created, but when you leave the page `destory` gets called on an item which doesn't exist. We end up with the following error:

> Uncaught Error: cannot call methods on button prior to initialization; attempted to call method 'destroy'

The other issue with this logic is buttons are never getting destroyed when `onremove` is called.

The whole issue is caused by a missing `!` in the if statement. This change adds it in to fix the problem.
2016-09-15 08:23:22 +09:30
2016-09-15 08:23:22 +09:30
2014-08-19 09:17:15 +12:00
2014-08-19 09:17:15 +12:00
2016-09-07 09:21:50 +01:00
2016-08-05 16:48:26 +12:00
2016-07-04 18:09:22 +12:00
2016-01-07 10:15:54 +13:00
2016-03-20 14:51:19 -07:00
2016-08-15 15:49:50 +12:00
2016-08-15 19:03:13 +12:00
2016-08-22 16:22:37 +01:00
2016-07-04 23:53:55 +01:00
2016-05-11 14:06:23 +12:00
2016-08-22 16:22:37 +01:00
2016-01-07 10:15:54 +13:00
2016-09-14 11:39:00 +01:00
2012-11-06 13:23:20 +13:00
2016-04-26 00:24:59 +01:00
2016-05-20 12:34:10 +01:00
2015-07-09 10:11:00 +12:00
2016-01-07 10:15:54 +13:00
2015-05-11 12:01:30 +12:00

SilverStripe Framework

Build Status Latest Stable Version Latest Unstable Version Total Downloads License Dependency Status Reference Status

PHP5 framework forming the base for the SilverStripe CMS (http://silverstripe.org). Requires a silverstripe-installer base project. Typically used alongside the cms module.

Installation

See installation on different platforms, and installation from source.

Bugtracker

Bugs are tracked on github.com. Please read our issue reporting guidelines.

Development and Contribution

If you would like to make changes to the SilverStripe core codebase, we have an extensive guide to contributing code.

License

Copyright (c) 2006-2014, SilverStripe Limited - www.silverstripe.com
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the 
      documentation and/or other materials provided with the distribution.
    * Neither the name of SilverStripe nor the names of its contributors may be used to endorse or promote products derived from this software 
      without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
OF SUCH DAMAGE.

Attribution

Description
No description provided
Readme 162 MiB
Languages
PHP 99.4%
Scheme 0.5%