Permalink
Browse files

Edit raw gedcom

  • Loading branch information...
JustCarmen committed May 19, 2018
1 parent f680c00 commit 81b3355cc1d2c571c2d456ab6151790bde8b27e1
Showing with 55 additions and 29 deletions.
  1. +1 −1 app/FancyPrivacyListClass.php
  2. +30 −3 app/Template/AdminTemplate.php
  3. +24 −25 css/style.css
@@ -284,7 +284,7 @@ protected function getRecordData($record) {
$gedrec = implode("\n", $lines);
return preg_replace(
"/@([^#@\n]+)@/m",
'<a href="edit_interface.php?action=editraw&ged=' . $WT_TREE->getName() . '&xref=\\1">@\\1@</a>',
'<a class="editraw" href="edit_interface.php?action=editraw&ged=' . $WT_TREE->getName() . '&xref=\\1">@\\1@</a>',
$gedrec
);
}
@@ -83,9 +83,18 @@ private function pageHeader(PageController $controller) {
}
});
$("#tree").on("change", function() {
oTable.ajax.url("module.php?mod=' . $this->getName() . '&mod_action=load_json&ged=" + $(this).val()).load();
});
$("#tree").on("change", function() {
oTable.ajax.url("module.php?mod=' . $this->getName() . '&mod_action=load_json&ged=" + $(this).val()).load();
});
$("#privacy-list").on("click", ".editraw", function(e){
e.preventDefault();
var url = $(this).attr("href");
$(".modal-title").load(url + " .wt-main-container h2");
$(".modal-body").load(url + " .wt-main-container form",function(){
$("#modal-edit-raw").modal({show:true});
});
});
');
echo $this->includeCss();
@@ -121,6 +130,24 @@ private function pageBody(PageController $controller) {
</thead>
<tbody></tbody>
</table>
<!-- Modal -->
<div class="modal fade" id="modal-edit-raw" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title d-flex flex-column">Modal with Dynamic Content</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<?php
}
@@ -1,25 +1,24 @@
/**
* webtrees: online genealogy
* Copyright (C) 2018 JustCarmen (http://justcarmen.nl)
* This program 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.
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#privacy_list tbody tr:hover {
background-color: #d9edf7 !important;
cursor: pointer;
}
#privacy_list tbody tr.gedcom-data:hover {
background-color: transparent !important;
cursor: auto;
}
/*# sourceMappingURL=style.css.map */
/*!
* webtrees: online genealogy
* Copyright (C) 2018 JustCarmen (http://justcarmen.nl)
* This program 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.
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#privacy_list tbody tr:hover {
background-color: #d9edf7 !important;
cursor: pointer;
}
#privacy_list tbody tr.gedcom-data:hover {
background-color: transparent !important;
cursor: auto;
}

0 comments on commit 81b3355

Please sign in to comment.