<?php /* Smarty version Smarty-3.1.7, created on 2013-01-24 21:29:29
         compiled from "C:\wamp\www\collab\activecollab\3.2.8\angie\frameworks\environment\views\default\fw_control_tower\index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:30115101a7b909f2e8-16753731%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a860776886bfd20c0f4d9b2a12dace5fd9bc8f32' => 
    array (
      0 => 'C:\\wamp\\www\\collab\\activecollab\\3.2.8\\angie\\frameworks\\environment\\views\\default\\fw_control_tower\\index.tpl',
      1 => 1357817598,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '30115101a7b909f2e8-16753731',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'control_tower' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.7',
  'unifunc' => 'content_5101a7b912647',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5101a7b912647')) {function content_5101a7b912647($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_json')) include 'C:\\wamp\\www\\collab\\activecollab/3.2.8/angie/frameworks/environment/helpers\\modifier.json.php';
?><?php echo $_smarty_tpl->tpl_vars['control_tower']->value->render();?>


<script type="text/javascript">
  App.Wireframe.Statusbar.setItemBadge('statusbar_item_control_tower', <?php echo smarty_modifier_json($_smarty_tpl->tpl_vars['control_tower']->value->loadBadgeValue());?>
);

  $('#control_tower').each(function() {
    var wrapper = $(this);
    var original_image = false;

    wrapper.find('td.submit a').each(function() {
      var anchor = $(this);
      var image = anchor.find('img:first');

      if (original_image === false) {
        original_image = image.attr('src');
      } // if

      anchor.click(function () {
        image.attr('src', App.Wireframe.Utils.indicatorUrl());
        $.ajax({
          'url' : App.extendUrl(anchor.attr('href'), { 'async' : 1 }),
          'type' : 'post',
          'data' : { 'submitted' : 'submitted' },
          success : function () {
            App.Wireframe.Flash.success(anchor.attr('while_working_message') + ' ' + App.lang('succeeded'));
            image.attr('src', original_image);
          },
          error : function () {
            App.Wireframe.Flash.error(anchor.attr('while_working_message') + ' ' + App.lang('failed'));
            image.attr('src', original_image);
          }
        });

        return false;
      });
    });
  });
</script><?php }} ?>