Skip to content

Commit

Permalink
Web site generator
Browse files Browse the repository at this point in the history
  • Loading branch information
osmakov committed Jun 26, 2019
1 parent 8829467 commit c1e98dc
Show file tree
Hide file tree
Showing 22 changed files with 1,304 additions and 120 deletions.
1 change: 1 addition & 0 deletions admin/setup/website/websiteStarterRecords.hml
@@ -1,3 +1,4 @@
<?xml version='1.0' encoding='UTF-8'?>
<hml xmlns="http://heuristnetwork.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://heuristnetwork.org/reference/scheme_hml.xsd">
<database id="99">Heurist_Construction_Zone</database>
<query w="all" depth="0" q="t:51 OR t:52 OR t:53" db="Heurist_Construction_Zone"/>
Expand Down
249 changes: 249 additions & 0 deletions admin/setup/website/websiteStarterRecords2.hml

Large diffs are not rendered by default.

42 changes: 3 additions & 39 deletions admin/structure/terms/editTerms.php
Expand Up @@ -62,6 +62,9 @@
.save-disabled, #btnSave.save-disabled:hover{
color:lightgray !important;
}
span.fancytree-node{
font-weight:bold !important;
}

/* it allows scroll on DnD */
ul.fancytree-container {
Expand All @@ -77,49 +80,10 @@
background-color: rgb(142, 169, 185);
}
*/
span.fancytree-node,
span.fancytree-title,
div.svs-contextmenu3 > span.ui-icon{
vertical-align:bottom;
padding-left:2px;
}
div.svs-contextmenu3{
cursor:pointer;
position:absolute;
right:5px;
/*min-width: 80px;*/
/*
color: white !important;
visibility: hidden;
float:right;
padding-left:10px;
*/
padding:3px;
display:none;
background:white;
color:#95A7B7;
border-radius:2px;
}
span.fancytree-node{
min-width: 300px;
padding:2px !important;
}
#term_tree{
background:none;
border:none;
}
span.fancytree-node {
border: none !important;
font-weight:bold !important;
display: block;
width:100%;
}

span.fancytree-node.fancytree-active{
background: #95A7B7 !important;
color: white !important;
}


/*
width":"100%","height":"100%
Expand Down
46 changes: 45 additions & 1 deletion h4styles.css
Expand Up @@ -1275,6 +1275,50 @@ div > .svs-contextmenu {
float:right;
}


span.fancytree-node,
span.fancytree-title,
div.svs-contextmenu3 > span.ui-icon{
vertical-align:bottom;
padding-left:2px;
}
div.svs-contextmenu3{
cursor:pointer;
position:absolute;
right:5px;
margin: 1px;
padding: 2 2 0 2;
display:none;
background:white;
color:#95A7B7;
border-radius:2px;
}
span.fancytree-node{
min-width: 300px;
padding:2px !important;
border: none !important;
display: block;
width:100%;
}
span.fancytree-node.fancytree-active{
background: #95A7B7 !important;
color: white !important;
}
div.svs-contextmenu4{
cursor:pointer;
position:absolute;
right:7px;
width: 16;
height: 16;
margin-top: -16;
display: none;
background-position: 0 0;
background-image: url(external/jquery.fancytree/skin-themeroller/loading.gif);
}




/*
::-webkit-scrollbar-button {
background: #8ea9b9
Expand Down Expand Up @@ -1325,7 +1369,7 @@ background: #8ea9b9
padding: 1em 1em .3em .4em;
}

.ent_wrapper{position:absolute; top:0;bottom:0;left:0;right:1px; overflow:hidden}
.ent_wrapper{position:absolute;top:0;bottom:0;left:0;right:1px;overflow:hidden;}
.ent_header, .ent_footer, .ent_content, .ent_content_full{position:absolute; left:0; right:1px;}
.ent_header{top:0;height:2.2em; padding:0.2em 0.5em;} /* border-bottom:lightgray solid 1px; background-color:#faa;, .ent_content_full*/
.ent_content{top:2.8em;bottom:3.5em; overflow-y:auto;}
Expand Down
2 changes: 1 addition & 1 deletion hclient/core/hapi.js
Expand Up @@ -1175,7 +1175,7 @@ prof =Profile
if(!(lt=='Beyond1914' || lt=='UAdelaide' ||
lt=='DigitalHarlem' || lt=='DigitalHarlem1935' || lt=='WebSearch' )){

window.hWin.HEURIST4.ui.onInactiveStart(300000, function(){ //5 minutes
window.hWin.HEURIST4.ui.onInactiveStart(5000, function(){ //300000 5 minutes
//check that still logged in
window.hWin.HAPI4.SystemMgr.verify_credentials(function(){
//ok we are still loggen in
Expand Down
17 changes: 15 additions & 2 deletions hclient/core/utils_ui.js
Expand Up @@ -1759,8 +1759,11 @@ window.hWin.HEURIST4.ui = {

//
// important manageRecords.js and selectRecords.js must be loaded
// if callback is defined it returns added/edited record as recordset
//
//
// rec_ID - record to edit
// query_request - returns set of records that can be edit in bunch (next/prev buttons)
// popup_options['onselect'] - define function that accepts added/edited record as recordset
//
openRecordEdit:function(rec_ID, query_request, popup_options){

/*
Expand Down Expand Up @@ -2371,6 +2374,14 @@ window.hWin.HEURIST4.ui = {
//todo optionally load dynamically editSymbology.js
editSymbology(current_value, needName, callback);
},

//
// show record action dialog
//
showEditCMSDialog: function( home_page_record_id, main_callback ){
//todo optionally load dynamically editCMS.js
editCMS( home_page_record_id, main_callback );
},

//
// show record action dialog
Expand Down Expand Up @@ -2628,6 +2639,8 @@ window.hWin.HEURIST4.ui = {
//
//
onInactiveStart: function(ms, cb){
return; //DISABLED

if(!window.hWin.HEURIST4.ui.wait_timeout){
if(!isNaN(ms) && Number(ms)>0){
window.hWin.HEURIST4.wait_terminated = false;
Expand Down
15 changes: 13 additions & 2 deletions hclient/widgets/dropdownmenus/mainMenu.js
Expand Up @@ -184,6 +184,7 @@ $.widget( "heurist.mainMenu", {
if(__include('Structure')) this._initMenu('Structure', 0);
if(__include('Verify')) this._initMenu('Verify', 0);
if(__include('Import')) this._initMenu('Import', 0);
if(__include('Website')) this._initMenu('Website', 0);
if(__include('Export')) {
this._initMenu('Export', 2, null, 3); //invisible in main menu
//this.menues['btn_Export'].hide();
Expand Down Expand Up @@ -466,7 +467,7 @@ console.log('>>>>'+that.divProfileItems.find('.ui-menu-item').css('padding-left'
.load(
window.hWin.HAPI4.baseURL+'hclient/widgets/dropdownmenus/mainMenu'+name+'.html',
function(){ //add ?t=+(new Date().getTime()) to avoid cache in devtime

that.menues['menu_'+name].find('.list-menu-only').hide();

that.menues['menu_'+name].addClass('menu-or-popup')
Expand Down Expand Up @@ -652,6 +653,16 @@ console.log('>>>>'+that.divProfileItems.find('.ui-menu-item').css('padding-left'
}
});

}else
if(action == "menu-cms-create"){

window.hWin.HEURIST4.ui.showEditCMSDialog( -1 );

}else
if(action == "menu-cms-edit"){

window.hWin.HEURIST4.ui.showEditCMSDialog( 1283 );

}else
if(action == "menu-database-properties"){

Expand Down Expand Up @@ -952,7 +963,7 @@ console.log('>>>>'+that.divProfileItems.find('.ui-menu-item').css('padding-left'
prefs['userCompetencyLevel'] = window.hWin.HAPI4.get_prefs_def('userCompetencyLevel', 2);
prefs['searchQueryInBrowser'] = window.hWin.HAPI4.get_prefs_def('searchQueryInBrowser', 1);
prefs['mapcluster_on'] = window.hWin.HAPI4.get_prefs_def('mapcluster_on', 1);

prefs['entity_btn_on'] = window.hWin.HAPI4.get_prefs_def('entity_btn_on', 1);

var map_controls = window.hWin.HAPI4.get_prefs_def('mapcontrols', 'bookmark,geocoder,selector,print,publish');
map_controls = map_controls.split(',');
Expand Down
50 changes: 50 additions & 0 deletions hclient/widgets/dropdownmenus/mainMenuWebsite.html
@@ -0,0 +1,50 @@
<!--
/**
* mainMenuCMS.html: top-level menu
*
* @package Heurist academic knowledge management system
* @link http://HeuristNetwork.org
* @copyright (C) 2005-2019 University of Sydney
* @author Artem Osmakov <artem.osmakov@sydney.edu.au>
* @author Ian Johnson <ian.johnson@sydney.edu.au>
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @version 4
*/
/*
* Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at http://www.gnu.org/licenses/gpl-3.0.txt
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied
* See the License for the specific language governing permissions and limitations under the License.
*/
-->

<li>
<a href="#" id="menu-cms-create"
data-user-admin-status="0" data-logaction="cms_new"
title="Create new website">
Create</a>
</li>

<li>
<a href="#" id="menu-cms-edit"
data-user-admin-status="0" data-logaction="cms_edit"
title="Edit website">
Edit</a>
</li>

<li>
<a href="#" id="menu-cms-url"
data-user-admin-status="0" data-logaction="cms_url"
title="Open your website in new tab">
URL</a>
<!--
<div>URL</div>
<ul>
<li class="ui-state-disabled"><div>Item11</div></li>
<li><div>Item12</div></li>
<li><div>Item13</div></li>
</ul>
-->
</li>
38 changes: 38 additions & 0 deletions hclient/widgets/editing/editCMS.html
@@ -0,0 +1,38 @@
<div class="ent_wrapper main_cms">
<div class="ui-layout-center preview ui-heurist-bg-light">
<iframe id="web_preview" style="overflow:none !important;width:100% !important"></iframe>
</div>
<div class="ui-layout-west ui-heurist-bg-light">
<div class="ent_wrapper cms">
<div class="ent_header" style="height:13em;font-size:0.8em">
<fieldset>
<div>
<div class="header" style="min-width:80px; width:80px;">
<label for="web_Name">Website title</label>
</div>
<input type="text" name="web_Name" id="web_Name" class="text ui-widget-content ui-corner-all"
maxlength="64" size="64" style="width:180px" />
<div style="Xwidth: 420px; font-size: smaller; margin-top: 0px; margin-bottom: 5px;">
The title of the website, will appear in browser toolbar, specify the name of the current database with #Database Name#
</div>
</div>

<div>
<div class="header" style="min-width:80px; width:80px;">
<label for="web_Theme">Theme</label>
</div>
<select name="web_Theme" id="web_Theme" class="text ui-widget-content ui-corner-all"></select>
<div style="font-size: smaller; margin-top: 0px; margin-bottom: 5px;">
Style of website
</div>
</div>
<div style="display: block;text-align: center;">
<div id="btn_edit_home" style="display:inline-block;">Edit Home Page</div>
<div id="btn_refresh" style="display:inline-block;">Refresh</div>
</div>
</fieldset>
</div>
<div class="ent_content_full" id="web_tree" style="top:13em;border-top:1px solid lightgray"></div>
</div>
</div>
</div>

0 comments on commit c1e98dc

Please sign in to comment.