aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-08-03 21:17:08 +0200
committerMario Vavti <mario@mariovavti.com>2016-08-03 21:17:08 +0200
commitb959641ca82d45f641a803b58dcfb91a90274956 (patch)
treefa658a7f3a8ab4f862e503ad2113fc24bffd0304 /view
parentc50bfa07ca3a456d69d73988f42e58e3282879e9 (diff)
parent416adeb169f16fd25f7dbf54232451d8647cc999 (diff)
downloadvolse-hubzilla-b959641ca82d45f641a803b58dcfb91a90274956.tar.gz
volse-hubzilla-b959641ca82d45f641a803b58dcfb91a90274956.tar.bz2
volse-hubzilla-b959641ca82d45f641a803b58dcfb91a90274956.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'view')
-rw-r--r--view/css/mod_webpages.css85
-rw-r--r--view/js/mod_webpages.js15
-rw-r--r--view/pdl/mod_webpages.pdl1
-rw-r--r--view/theme/redbasic/schema/dark.css43
-rw-r--r--view/theme/redbasic/schema/simple_black_on_white.css7
-rw-r--r--view/theme/redbasic/schema/simple_green_on_black.css52
-rw-r--r--view/theme/redbasic/schema/simple_white_on_black.css44
-rwxr-xr-xview/tpl/field_acheckbox.tpl2
-rw-r--r--view/tpl/settings_tokens.tpl44
-rw-r--r--view/tpl/webpage_import.tpl126
-rw-r--r--view/tpl/website_import_tools.tpl37
11 files changed, 445 insertions, 11 deletions
diff --git a/view/css/mod_webpages.css b/view/css/mod_webpages.css
index 1c6ec4aea..f72f632dd 100644
--- a/view/css/mod_webpages.css
+++ b/view/css/mod_webpages.css
@@ -34,3 +34,88 @@
.webpage-list-tool {
padding: 7px 10px;
}
+
+.webpage-import-button {
+ background-color: green;
+ color: white;
+}
+
+.webpage-import-button:hover {
+ background-color: darkgreen;
+}
+
+
+/* SQUARED TWO */
+.squaredTwo {
+ width: 28px;
+ height: 28px;
+ background: #fcfff4;
+
+ background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead',GradientType=0 );
+ margin: 20px auto;
+
+ -webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
+ -moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
+ box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
+ position: relative;
+}
+
+.squaredTwo label {
+ cursor: pointer;
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ left: 4px;
+ top: 4px;
+
+ -webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
+ -moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
+ box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
+
+ background: -webkit-linear-gradient(top, #222 0%, #45484d 100%);
+ background: -moz-linear-gradient(top, #222 0%, #45484d 100%);
+ background: -o-linear-gradient(top, #222 0%, #45484d 100%);
+ background: -ms-linear-gradient(top, #222 0%, #45484d 100%);
+ background: linear-gradient(top, #222 0%, #45484d 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#222', endColorstr='#45484d',GradientType=0 );
+}
+
+.squaredTwo label:after {
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
+ filter: alpha(opacity=0);
+ opacity: 0;
+ content: '';
+ position: absolute;
+ width: 9px;
+ height: 5px;
+ background: transparent;
+ top: 4px;
+ left: 4px;
+ border: 3px solid #fcfff4;
+ border-top: none;
+ border-right: none;
+
+ -webkit-transform: rotate(-45deg);
+ -moz-transform: rotate(-45deg);
+ -o-transform: rotate(-45deg);
+ -ms-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+}
+
+.squaredTwo label:hover::after {
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
+ filter: alpha(opacity=30);
+ opacity: 0.3;
+}
+
+.squaredTwo input[type=checkbox]:checked + label:after {
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
+ filter: alpha(opacity=100);
+ opacity: 1;
+}
+
diff --git a/view/js/mod_webpages.js b/view/js/mod_webpages.js
new file mode 100644
index 000000000..7cfe297e1
--- /dev/null
+++ b/view/js/mod_webpages.js
@@ -0,0 +1,15 @@
+$(document).ready(function() {
+ $("input[type=\"checkbox\"]").hide();
+});
+
+window.isChecked = true;
+
+function checkedAll(isChecked) {
+ window.isChecked = !window.isChecked ;
+ var c = document.getElementsByTagName('input');
+ for (var i = 0; i < c.length; i++){
+ if (c[i].type == 'checkbox'){
+ c[i].checked = isChecked;
+ }
+ }
+} \ No newline at end of file
diff --git a/view/pdl/mod_webpages.pdl b/view/pdl/mod_webpages.pdl
index cef69f194..b62ec6e7c 100644
--- a/view/pdl/mod_webpages.pdl
+++ b/view/pdl/mod_webpages.pdl
@@ -1,3 +1,4 @@
[region=aside]
[widget=design_tools][/widget]
+[widget=website_import_tools][/widget]
[/region] \ No newline at end of file
diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css
index ea50f50ec..ed2714dfc 100644
--- a/view/theme/redbasic/schema/dark.css
+++ b/view/theme/redbasic/schema/dark.css
@@ -3,6 +3,31 @@
background-color: transparent;
}
+textarea, input, select
+{
+ color: #BBB !important;
+ background: #333 !important;
+ border-color: #2B2B2B !important;
+ }
+
+#profile-jot-submit-wrapper {
+ border-top: none;
+ padding: 10px 0;
+}
+
+#jot-title-wrap {
+ border-bottom: none;
+ margin-bottom: 5px;
+}
+
+optgroup {
+ color: #CCC !important;
+}
+
+option {
+ color: $link_colour !important;
+}
+
.vcard, #contact-block, .widget {
background-color: transparent;
border: none;
@@ -390,3 +415,21 @@ pre {
box-shadow: 0px 3px 3px #222;
}
+.contextual-help-content-open {
+ background: $nav_bg;
+ top: 50px;
+ border-bottom: #555 1px solid;
+ box-shadow: 0px 3px 3px rgba(85,85,85,0.2);
+}
+
+.contextual-help-tool {
+ opacity: 0.5;
+}
+
+.contextual-help-tool:hover {
+ opacity: 1;
+}
+
+.contextual-help-tool i {
+ color: $link_colour;
+}
diff --git a/view/theme/redbasic/schema/simple_black_on_white.css b/view/theme/redbasic/schema/simple_black_on_white.css
index b7cca0930..7dd8125a4 100644
--- a/view/theme/redbasic/schema/simple_black_on_white.css
+++ b/view/theme/redbasic/schema/simple_black_on_white.css
@@ -290,3 +290,10 @@ pre {
-webkit-box-shadow: none;
box-shadow: none;
}
+
+
+.contextual-help-content-open {
+ background: #FFF;
+ top: 50px;
+
+}
diff --git a/view/theme/redbasic/schema/simple_green_on_black.css b/view/theme/redbasic/schema/simple_green_on_black.css
index 990980e8f..ca2e5b15a 100644
--- a/view/theme/redbasic/schema/simple_green_on_black.css
+++ b/view/theme/redbasic/schema/simple_green_on_black.css
@@ -3,6 +3,31 @@
background-color: transparent;
}
+textarea, input, select
+{
+ color: $font_colour !important;
+ background: $bgcolour !important;
+ border: 1px solid #143D12 !important;
+ }
+
+#profile-jot-submit-wrapper {
+ border-top: none;
+ padding: 10px 0;
+}
+
+#jot-title-wrap {
+ border-bottom: none;
+ margin-bottom: 5px;
+}
+
+optgroup {
+ color: #32962D !important;
+}
+
+option {
+ color: $link_colour !important;
+}
+
.vcard, #contact-block, .widget {
background-color: transparent;
border: none;
@@ -153,22 +178,22 @@ input[type="submit"] {
color: #50f148 !important;
}
-nav .dropdown-menu>li>a{
+nav .dropdown-menu>li>a {
color: #50f148;
}
-nav .dropdown-menu>li>a:hover,nav .dropdown-menu>li>a:focus{
+nav .dropdown-menu>li>a:hover,nav .dropdown-menu>li>a:focus {
color: #50f148;
background-color: #143D12;
background-image: none;
}
-nav .dropdown-menu .divider{
+nav .dropdown-menu .divider {
background-color: #143D12;
}
-nav .dropdown-menu>li>a:hover,nav .dropdown-menu>li>a:focus{
+nav .dropdown-menu>li>a:hover,nav .dropdown-menu>li>a:focus {
color: #50f148;
background-color: #143D12;
background-image: none;
@@ -339,3 +364,22 @@ pre {
-webkit-box-shadow: none;
box-shadow: none;
}
+
+.contextual-help-content-open {
+ background: $nav_bg;
+ top: 50px;
+ border-bottom: #1C5419 1px solid;
+ box-shadow: 0px 3px 3px rgba(28,84,25,0.2);
+}
+
+.contextual-help-tool {
+ opacity: 0.5;
+}
+
+.contextual-help-tool:hover {
+ opacity: 1;
+}
+
+.contextual-help-tool i {
+ color: $link_colour;
+}
diff --git a/view/theme/redbasic/schema/simple_white_on_black.css b/view/theme/redbasic/schema/simple_white_on_black.css
index c23dbaf68..a462c4d29 100644
--- a/view/theme/redbasic/schema/simple_white_on_black.css
+++ b/view/theme/redbasic/schema/simple_white_on_black.css
@@ -3,6 +3,31 @@
background-color: transparent;
}
+textarea, input, select
+{
+ color: $font_colour !important;
+ background: $bgcolour !important;
+ border: 1px solid #FFF !important;
+ }
+
+#profile-jot-submit-wrapper {
+ border-top: none;
+ padding: 10px 0;
+}
+
+#jot-title-wrap {
+ border-bottom: none;
+ margin-bottom: 5px;
+}
+
+optgroup {
+ color: #FFF !important;
+}
+
+option {
+ color: $link_colour !important;
+}
+
.vcard, #contact-block, .widget {
background-color: transparent;
border: none;
@@ -312,3 +337,22 @@ pre {
-webkit-box-shadow: none;
box-shadow: none;
}
+
+.contextual-help-content-open {
+ background: $nav_bg;
+ top: 50px;
+ border-bottom: #FFF 1px solid;
+ box-shadow: 0px 3px 3px rgba(255,255,255,0.2);
+}
+
+.contextual-help-tool {
+ opacity: 0.5;
+}
+
+.contextual-help-tool:hover {
+ opacity: 1;
+}
+
+.contextual-help-tool i {
+ color: $link_colour;
+}
diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl
index b54a4f3c3..c87b9ac79 100755
--- a/view/tpl/field_acheckbox.tpl
+++ b/view/tpl/field_acheckbox.tpl
@@ -9,7 +9,7 @@
</td>
{{/if}}
<td class="abook-me">
- {{if $self || !$field.5}}
+ {{if $self || !$field.5 || $twocol }}
<input type="checkbox" name='{{$field.0}}' class='abook-edit-me' id='me_id_{{$field.0}}' value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}} />
{{/if}}
{{if $notself && $field.5}}
diff --git a/view/tpl/settings_tokens.tpl b/view/tpl/settings_tokens.tpl
index 22af381e9..6f08ce971 100644
--- a/view/tpl/settings_tokens.tpl
+++ b/view/tpl/settings_tokens.tpl
@@ -17,13 +17,45 @@
<div class="settings-submit-wrapper form-group">
<button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button>
</div>
- </form>
- <div class="descriptive-text">{{$desc2}}</div>
- <ul>
- <li>{{$url1}}<span class="zat-example">?f=&zat=<span class="token-mirror"></span></span></li>
- <li>{{$url2}}<span class="zat-example">?f=&zat=<span class="token-mirror"></span></span></li>
- </ul>
</div>
+
+ <div class="panel">
+ <div class="section-subtitle-wrapper" role="tab" id="perms-tool">
+ <h3>
+ <a data-toggle="collapse" data-parent="#contact-edit-tools" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse">
+ {{$permlbl}}
+ </a>
+ </h3>
+ </div>
+ <div id="perms-tool-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="perms-tool">
+ <div class="section-content-tools-wrapper">
+ <div class="section-content-warning-wrapper">
+ {{$permnote}}
+ </div>
+
+ <table id="perms-tool-table" class=form-group>
+ <tr>
+ <td></td><td class="abook-them">{{$them}}</td><td colspan="2" class="abook-me">{{$me}}</td>
+ </tr>
+ {{foreach $perms as $prm}}
+ {{include file="field_acheckbox.tpl" field=$prm}}
+ {{/foreach}}
+ </table>
+
+ <div class="settings-submit-wrapper" >
+ <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+
+ <div class="descriptive-text">{{$desc2}}</div>
+ <ul>
+ <li>{{$url1}}<span class="zat-example">?f=&zat=<span class="token-mirror"></span></span></li>
+ <li>{{$url2}}<span class="zat-example">?f=&zat=<span class="token-mirror"></span></span></li>
+ </ul>
+
{{if $tokens}}
<div class="section-content-wrapper-np">
<table id="atoken-index">
diff --git a/view/tpl/webpage_import.tpl b/view/tpl/webpage_import.tpl
new file mode 100644
index 000000000..fdc983932
--- /dev/null
+++ b/view/tpl/webpage_import.tpl
@@ -0,0 +1,126 @@
+<div class="generic-content-wrapper">
+ <form action="" method="post" autocomplete="on" >
+ <input type="hidden" name="action" value="importselected">
+ <div class="section-title-wrapper">
+ <div class="pull-right">
+ <button class="btn btn-md btn-success" type="submit" name="submit" value="{{$importbtn}}">{{$importbtn}}</button>
+ </div>
+ <h2>{{$title}}</h2>
+ <div class="clear"></div>
+ </div>
+ <div id="import-website-content-wrapper" class="section-content-wrapper">
+ <div class="pull-left">
+ <button id="toggle-select-all" class="btn btn-xs btn-primary" onclick="checkedAll(window.isChecked); return false;"><i class="fa fa-check"></i>&nbsp;Toggle Select All</button>
+ </div>
+ <div class="clear"></div>
+ <h4>Scanned Pages</h4>
+ <div>
+ <table class="table-striped table-responsive table-hover" style="width: 100%;">
+ <tr><td>Import?</td><td>Page</td><!--<td>Existing Page</td>--></tr>
+ {{foreach $pages as $page}}
+ <tr>
+ <td>
+ <div class='squaredTwo'>
+ <input type="checkbox" id="page_{{$page.pagelink}}" name="page[]" value="{{$page.pagelink}}">
+ <label for="page_{{$page.pagelink}}"></label>
+ </div>
+ </td>
+ <td>
+ <div class='desc'>
+ Page Link: {{$page.pagelink}}<br>
+ Layout: {{$page.layout}}<br>
+ Title: {{$page.title}}<br>
+ Content File: {{$page.contentfile}}<br>
+ Type: {{$page.type}}<br>
+ </div>
+ </td>
+ <!-- TODO: Retrieve existing element information to avoid accidental overwriting
+ <td>
+ <div class='desc'>
+ Name: {{$page.curpage.pagelink}}<br>
+ Layout: {{$page.curpage.layout}}<br>
+ Title: {{$page.curpage.title}}<br>
+ Last edit: {{$page.curpage.edited}}<br>
+ Type: {{$page.curpage.type}}<br>
+ </div>
+ </td>
+ -->
+ </tr>
+ {{/foreach}}
+ </table>
+ </div>
+
+
+ <h4>Scanned Layouts</h4>
+ <div>
+ <table class="table-striped table-responsive table-hover" style="width: 100%;">
+ <tr><td>Import?</td><td>Layout</td><!--<td>Existing Layout</td>--></tr>
+ {{foreach $layouts as $layout}}
+ <tr>
+ <td>
+ <div class='squaredTwo'>
+ <input type="checkbox" id="layout_{{$layout.name}}" name="layout[]" value="{{$layout.name}}">
+ <label for="layout_{{$layout.name}}"></label>
+ </div>
+ </td>
+ <td>
+ <div class='desc'>
+ Name: {{$layout.name}}<br>
+ Description: {{$layout.description}}<br>
+ Content File: {{$layout.contentfile}}<br>
+ </div>
+ </td>
+ <!-- TODO: Retrieve existing element information to avoid accidental overwriting
+ <td>
+ <div class='desc'>
+ Name: {{$layout.curblock.name}}<br>
+ Title: {{$layout.curblock.description}}<br>
+ Last edit: {{$layout.curblock.edited}}<br>
+ </div>
+ </td>
+ -->
+ </tr>
+ {{/foreach}}
+ </table>
+ </div>
+
+ <h4>Scanned Blocks</h4>
+ <div>
+ <table class="table-striped table-responsive table-hover" style="width: 100%;">
+ <tr><td>Import?</td><td>Block</td><!--<td>Existing Block</td>--></tr>
+ {{foreach $blocks as $block}}
+ <tr>
+ <td>
+ <div class='squaredTwo'>
+ <input type="checkbox" id="block_{{$block.name}}" name="block[]" value="{{$block.name}}">
+ <label for="block_{{$block.name}}"></label>
+ </div>
+ </td>
+ <td>
+ <div class='desc'>
+ Name: {{$block.name}}<br>
+ Title: {{$block.title}}<br>
+ Content File: {{$block.contentfile}}<br>
+ Type: {{$block.type}}<br>
+ </div>
+ </td>
+ <!-- TODO: Retrieve existing element information to avoid accidental overwriting
+ <td>
+ <div class='desc'>
+ Name: {{$block.curblock.name}}<br>
+ Title: {{$block.curblock.title}}<br>
+ Last edit: {{$block.curblock.edited}}<br>
+ Type: {{$block.curblock.type}}<br>
+ </div>
+ </td>
+ -->
+ </tr>
+ {{/foreach}}
+ </table>
+ </div>
+
+ </div>
+ <div class="clear"></div>
+ </form>
+</div>
+
diff --git a/view/tpl/website_import_tools.tpl b/view/tpl/website_import_tools.tpl
new file mode 100644
index 000000000..cb3e6b524
--- /dev/null
+++ b/view/tpl/website_import_tools.tpl
@@ -0,0 +1,37 @@
+<div id="website-import-tools" class="widget">
+ <h3>{{$title}}</h3>
+ <ul class="nav nav-pills nav-stacked">
+ <li>
+ <a href="#" onclick="openClose('import-form');
+ return false;"><i class="fa fa-cloud-upload generic-icons"></i> {{$import_label}}</a>
+ </li>
+ <li>
+ <form id="import-form" enctype="multipart/form-data" method="post" action="" style="display: none;" class="sub-menu">
+
+ <input type="hidden" name="action" value="scan">
+
+ <p style="margin-top: 20px;" class="descriptive-text">{{$file_import_text}}</p>
+ <div class="form-group">
+ <div class="input-group">
+ <input class="widget-input" type="text" name="path" title="{{$hint}}" placeholder="{{$desc}}" />
+ <div class="input-group-btn">
+ <button class="btn btn-default btn-sm" type="submit" name="cloudsubmit" value="{{$select}}"><i class="fa fa-folder-open generic-icons"></i></button>
+ </div>
+ </div>
+ </div>
+
+ <!-- Or upload a zipped file containing the website -->
+ <p class="descriptive-text">{{$file_upload_text}}</p>
+ <div class="form-group">
+
+ <div class="input-group">
+ <input class="widget-input" type="file" name="zip_file" />
+ <div class="input-group-btn">
+ <button class="btn btn-default btn-sm" type="submit" name="w_upload" value="w_upload"><i class="fa fa-file-archive-o generic-icons"></i></button>
+ </div>
+ </div>
+ </div>
+ </form>
+ </li>
+ </ul>
+</div>