From 89e1cd19490e18916f7f8752930e13f30c82c563 Mon Sep 17 00:00:00 2001 From: alettieri Date: Wed, 6 Feb 2013 14:06:27 -0800 Subject: [PATCH 1/3] Updated javascript and the way the button label's are parsed, got away from setInterval and moved to pub/sub model --- wp-content/wpalchemy/MediaAccess.php | 188 ++++++++++++++++++++------- 1 file changed, 138 insertions(+), 50 deletions(-) diff --git a/wp-content/wpalchemy/MediaAccess.php b/wp-content/wpalchemy/MediaAccess.php index 6748ad1..0350638 100644 --- a/wp-content/wpalchemy/MediaAccess.php +++ b/wp-content/wpalchemy/MediaAccess.php @@ -259,12 +259,12 @@ public function getButton(array $attr = array()) ( 'label' => 'Add Media', 'href' => $this->getButtonLink($tab), - 'class' => $this->getButtonClass($groupname) . ' button', + 'class' => $this->getButtonClass($groupname) . ' button' ); if (isset($this->insert_button_label)) { - $attr_default['class'] .= " {label:'" . $this->insert_button_label . "'}"; + $attr_default['data-button-label'] = $this->insert_button_label; } ### @@ -314,36 +314,41 @@ public function init() ?>