forked from jeedom/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
Conflicts: core/class/template.class.php
- Loading branch information
Showing
9 changed files
with
268 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Ce dossier doit contenir toutes les librairies externes utilisées par votre plugin. | ||
Ce dossier doit contenir toutes les librairies externes utilisées par votre plugin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
<?php | ||
|
||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
try { | ||
require_once dirname(__FILE__) . '/../../../../core/php/core.inc.php'; | ||
include_file('core', 'authentification', 'php'); | ||
|
||
if (!isConnect('admin')) { | ||
throw new Exception(__('401 - Accès non autorisé', __FILE__)); | ||
} | ||
|
||
|
||
|
||
throw new Exception(__('Aucune méthode correspondante à : ', __FILE__) . init('action')); | ||
/* * *********Catch exeption*************** */ | ||
} catch (Exception $e) { | ||
ajax::error(displayExeption($e), $e->getCode()); | ||
} | ||
?> | ||
<?php | ||
|
||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
try { | ||
require_once dirname(__FILE__) . '/../../../../core/php/core.inc.php'; | ||
include_file('core', 'authentification', 'php'); | ||
|
||
if (!isConnect('admin')) { | ||
throw new Exception(__('401 - Accès non autorisé', __FILE__)); | ||
} | ||
|
||
|
||
|
||
throw new Exception(__('Aucune méthode correspondante à : ', __FILE__) . init('action')); | ||
/* * *********Catch exeption*************** */ | ||
} catch (Exception $e) { | ||
ajax::error(displayExeption($e), $e->getCode()); | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<<<<<<< HEAD | ||
<?php | ||
|
||
/* This file is part of Jeedom. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<?php | ||
|
||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
require_once dirname(__FILE__) . '/../../../../core/php/core.inc.php'; | ||
/* | ||
* Non obligatoire mais peut être utilisé si vous voulez charger en même temps que votre | ||
* plugin des librairies externes (ne pas oublier d'adapter plugin_info/info.xml). | ||
* | ||
* | ||
*/ | ||
?> | ||
<?php | ||
|
||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
require_once dirname(__FILE__) . '/../../../../core/php/core.inc.php'; | ||
/* | ||
* Non obligatoire mais peut être utilisé si vous voulez charger en même temps que votre | ||
* plugin des librairies externes (ne pas oublier d'adapter plugin_info/info.xml). | ||
* | ||
* | ||
*/ | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
|
||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
|
||
|
||
/* | ||
* Fonction pour l'ajout de commande, appellé automatiquement par plugin.template | ||
*/ | ||
function addCmdToTable(_cmd) { | ||
if (!isset(_cmd)) { | ||
var _cmd = {configuration: {}}; | ||
} | ||
if (!isset(_cmd.configuration)) { | ||
_cmd.configuration = {}; | ||
} | ||
var tr = '<tr class="cmd" data-cmd_id="' + init(_cmd.id) + '">'; | ||
tr += '<td>'; | ||
tr += '<span class="cmdAttr" data-l1key="id"></span>'; | ||
tr += '</td>'; | ||
tr += '<td>'; | ||
tr += '<input class="cmdAttr form-control input-sm" data-l1key="name" style="width : 140px;" placeholder="{{Nom}}"></td>'; | ||
tr += '<td>'; | ||
tr += '<input class="cmdAttr form-control type input-sm" data-l1key="type" value="info" disabled style="margin-bottom : 5px;" />'; | ||
tr += '<span class="subType" subType="' + init(_cmd.subType) + '"></span>'; | ||
tr += '</td>'; | ||
if (is_numeric(_cmd.id)) { | ||
tr += '<a class="btn btn-default btn-xs cmdAction" data-action="test"><i class="fa fa-rss"></i> {{Tester}}</a>'; | ||
} | ||
tr += '<i class="fa fa-minus-circle pull-right cmdAction cursor" data-action="remove"></i></td>'; | ||
tr += '</tr>'; | ||
$('#table_cmd tbody').append(tr); | ||
$('#table_cmd tbody tr:last').setValues(_cmd, '.cmdAttr'); | ||
if (isset(_cmd.type)) { | ||
$('#table_cmd tbody tr:last .cmdAttr[data-l1key=type]').value(init(_cmd.type)); | ||
} | ||
jeedom.cmd.changeType($('#table_cmd tbody tr:last'), init(_cmd.subType)); | ||
} | ||
|
||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
|
||
|
||
/* | ||
* Fonction pour l'ajout de commande, appellé automatiquement par plugin.template | ||
*/ | ||
function addCmdToTable(_cmd) { | ||
if (!isset(_cmd)) { | ||
var _cmd = {configuration: {}}; | ||
} | ||
if (!isset(_cmd.configuration)) { | ||
_cmd.configuration = {}; | ||
} | ||
var tr = '<tr class="cmd" data-cmd_id="' + init(_cmd.id) + '">'; | ||
tr += '<td>'; | ||
tr += '<span class="cmdAttr" data-l1key="id"></span>'; | ||
tr += '</td>'; | ||
tr += '<td>'; | ||
tr += '<input class="cmdAttr form-control input-sm" data-l1key="name" style="width : 140px;" placeholder="{{Nom}}"></td>'; | ||
tr += '<td>'; | ||
tr += '<input class="cmdAttr form-control type input-sm" data-l1key="type" value="info" disabled style="margin-bottom : 5px;" />'; | ||
tr += '<span class="subType" subType="' + init(_cmd.subType) + '"></span>'; | ||
tr += '</td>'; | ||
if (is_numeric(_cmd.id)) { | ||
tr += '<a class="btn btn-default btn-xs cmdAction" data-action="test"><i class="fa fa-rss"></i> {{Tester}}</a>'; | ||
} | ||
tr += '<i class="fa fa-minus-circle pull-right cmdAction cursor" data-action="remove"></i></td>'; | ||
tr += '</tr>'; | ||
$('#table_cmd tbody').append(tr); | ||
$('#table_cmd tbody tr:last').setValues(_cmd, '.cmdAttr'); | ||
if (isset(_cmd.type)) { | ||
$('#table_cmd tbody tr:last .cmdAttr[data-l1key=type]').value(init(_cmd.type)); | ||
} | ||
jeedom.cmd.changeType($('#table_cmd tbody tr:last'), init(_cmd.subType)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
<?php | ||
|
||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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é}}'); | ||
} | ||
?> | ||
|
||
Exemple de modale | ||
|
||
<?php | ||
|
||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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é}}'); | ||
} | ||
?> | ||
|
||
Exemple de modale | ||
Oops, something went wrong.