*
 * Jeedom is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Jeedom. If not, see <http://www.gnu.org/licenses/>.
 */
if (!isConnect('admin')) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
if (init('path') == '') {
    throw new Exception('{{Aucun widget fourni}}');
}
$widget = widget::byPath(init('path'));
if (!is_object($widget)) {
    throw new Exception('{{Widget non trouvé}}');
}
include_file('3rdparty', 'jquery.tablesorter/theme.bootstrap', 'css');
include_file('3rdparty', 'jquery.tablesorter/jquery.tablesorter.min', 'js');
include_file('3rdparty', 'jquery.tablesorter/jquery.tablesorter.widgets.min', 'js');
?>

<div style="display: none;" id="md_applyWidgetAlert"></div>
<div style="position: fixed;height: 50px;background-color: white;margin-top:-6px;padding-top: 6px;" id="div_boutons">
    <a class="btn btn-default" id="bt_applyWidgetToogle" data-state="0"><i class="fa fa-check-circle-o"></i> {{Basculer}}</a>
    <a class="btn btn-success pull-right bt_applyWidgetToCmd" data-path="<?php 
echo $widget->getPath();
?>
" style="color : white;" data-version=""><i class="fa fa-check"></i> {{Valider}}</a>