$("#globaldatasets").append('<option value="'+ds[i]+'">'+prop.name+'</option>');
}
},
+ currentdataset: function(){
+ return $("#globaldatasets :selected").val();
+ },
loaddataset: function(){
var gdset = $("#globaldatasets :selected").val();
if (gdset == ""){
branding: false,
menubar:false,
statusbar: false,
- plugins: 'searchreplace autolink directionality visualblocks visualchars advlist lists textcolor colorpicker textpattern',
+ plugins: 'searchreplace autolink directionality visualblocks visualchars advlist lists textpattern',
toolbar: 'bold italic underline strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat',
image_advtab: true,
language: 'de',
<th data-sortable="true">Sender</th>
<th data-sortable="true">Referenz</th>
<th data-sortable="true">Status</th>
- <th data-sortable="true" data-align="right" data-width="100">Betrag</th>
+ <th data-sortable="true" data-align="right">Betrag</th>
<tfoot></tfoot>
<tbody></tbody>
</table>
function initpage(){
console.log("ID:" + mpref.cfg.id);
if (mpref.cfg.id){
+ loadform();
+ }
+}
+function loadform(){
+ var pref = parent.usersystem.getPreference(mpref.cfg.id);
+ console.log(pref);
+ for (var i in pref){
+ $("#" + i).val(pref[i]);
}
}
</nav>
<div class="cotainer-fluid" style="margin-top: 52px;">
<!-- <button class="btn btn-secondary" onclick="parent.usersystem.showError('MyError','My Error Message from settings!');">Show Error</button> -->
- <table class="table table-bordered table-hover table-striped" id="tbl_databases">
+ <table class="table table-bordered table-hover table-striped" id="tbl_datasets">
<thead class="thead-dark">
<tr>
<th data-checkbox="true"></th>
<th data-sortable="true">Name</th>
<th data-sortable="true">Database</th>
<th data-sortable="true">Server</th>
- <th data-sortable="true">Filepath</th>
<th data-sortable="true">Type</th>
<th data-sortable="true">VPN</th>
- <th data-sortable="true">Verbunden</th>
+ <th>Verbunden</th>
</tr>
</thead>
+ <tfoot></tfoot>
+ <tbody></tbody>
</table>
</div>
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
+var winh = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
+var tblh = winh-54;
+
function initpage(){
console.log(parent.usersystem.getsysinfo());
+ loadtable();
//parent.usersystem.setProperty("testproperty",{id:"TEST"});
-}
\ No newline at end of file
+}
+
+function loadtable(){
+
+ var connected=parent.browserapp.currentdataset();
+
+ var localds = parent.usersystem.getLocalDataSets();
+ console.log(localds);
+ for (var i in localds){
+ var prop = parent.usersystem.getPreference(localds[i]);
+ console.log("PROP");
+ console.log(connected +"<=>"+ localds[i]);
+
+ console.log(prop);
+ var row = '<tr id="' + localds[i] + '">' +
+ '<td></td>' +
+ '<td>'+prop.name+'</td>' +
+ '<td>'+prop.dbfile+'</td>' +
+ '<td>'+prop.server+'</td>' +
+ '<td>'+prop.type+'</td>' +
+ '<td>'+prop.vpn+'</td>' +
+ '<td class="btn-'+ ((localds[i]==connected)?'success':'secondary')+'"></td>'+
+ '</tr>';
+ $("#tbl_datasets").append(row);
+
+ //$("#globaldatasets").append('<option value="'+ds[i]+'">'+prop.name+'</option>');
+ }
+ $('#tbl_datasets').bootstrapTable({
+ pagination: false,
+ search: false,
+ height: tblh,
+ clickToSelect: true
+ });
+}
+
+// function settings_edit(){
+// var settings_id= getTableSelectionID();
+// if (settings_id){
+// parent.browserapp.loadmodulepage('settings','form_datastore',{"id":settings_id});
+// }
+
+// }
+
+function getTableSelectionID(){
+ var sel = $('#tbl_datasets').bootstrapTable('getSelections');
+ var id = null;
+
+ if (sel){ id=sel[0]._id; }
+ console.log("Selected ID:" + id);
+ return id;
+ }
+
+ function getTableSelectionIDs(){
+ var sel = $('#tbl_datasets').bootstrapTable('getSelections');
+ var ids = [];
+ if (sel){
+ for (var s in sel){
+ ids.push(s._id);
+ }
+ }
+ return ids;
+ }
+
+
\ No newline at end of file
new: function(){
parent.browserapp.loadmodulepage('settings','form_datastore',{"id":""});
},
- edit: function(name){
-
- },
- load: function(name){
-
+ edit: function(){
+ var settings_id= getTableSelectionID();
+ console.log(settings_id);
+ if (settings_id){
+ parent.browserapp.loadmodulepage('settings','form_datastore',{"id":settings_id});
+ }
},
delete: function(){
--- /dev/null
+var emailtemplate = {
+ new: function(){
+
+ },
+ edit: function(){
+
+ },
+ duplicate: function(){
+
+ },
+ delete: function(){
+
+ }
+}
\ No newline at end of file
--- /dev/null
+var printtemplate = {
+ new: function(){
+
+ },
+ edit: function(){
+
+ },
+ duplicate: function(){
+
+ },
+ delete: function(){
+
+ }
+}