Skip to content

Commit d9a7a93

Browse files
Updated
1. Drop down menu Arrow and stuff. (Remove the dropdown icon) 2. Language improved 3. Form folder added in HTML folder for 4. Save Backend setting with Ctrl+s (IF It's works we keep it.)
1 parent 6e869df commit d9a7a93

File tree

9 files changed

+281
-9
lines changed

9 files changed

+281
-9
lines changed

astroid/astroid-framework/assets/js/astroid.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,19 @@ var AstroidAdmin = function AstroidAdmin() {
471471
var hours = date.getHours();
472472
var minutes = date.getMinutes();
473473
var seconds = date.getSeconds();
474-
var exportFileDefaultName = $('#export-link').data('template-name') + ' ' + (year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds) + '.json';
474+
var exportName = prompt("Please enter your desired name", "astroid-zero-template");
475+
if (exportName === "") {
476+
Admin.notify("Can't be empty", "error");
477+
return false
478+
} else if (exportName) {
479+
var re = /^[0-9a-zA-Z].*/;
480+
if (!re.test(exportName) || /\s/.test(exportName)) {
481+
Admin.notify("Invalid", "error");
482+
return false
483+
}else{
484+
var exportFileDefaultName = exportName + ' ' + (year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds) + '.json';
485+
}
486+
}
475487
$('#export-link').attr('href', dataUri);
476488
$('#export-link').attr('download', exportFileDefaultName);
477489
$('#export-link')[0].click();
@@ -631,6 +643,13 @@ var Admin = new AstroidAdmin();
631643
(function ($) {
632644
var docReady = function docReady() {
633645
Admin.init();
646+
$(document).on('keydown', function ( e ) {
647+
// You may replace `s` with whatever key you want
648+
if ((e.metaKey || e.ctrlKey) && ( String.fromCharCode(e.which).toLowerCase() === 's') ) {
649+
$("#astroid-form").submit();
650+
return false
651+
}
652+
});
634653
getGoogleFonts();
635654
initAstroidUploader();
636655
$('.astroid-code-editor-exit-fs').click(function () {

astroid/astroid-framework/assets/js/astroid.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

astroid/astroid-framework/framework/elements/column-default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</field>
5555
<field ngShow="background_setting =='video'" name="background_video" type="astroidmedia" media="videos" label="TPL_ASTROID_BACKGROUND_VIDEO_LABEL" description="TPL_ASTROID_BACKGROUND_VIDEO_DESC"/>
5656

57-
<field ngShow="background_setting =='gradient'" description="ASTROID_SELECT_BACKGROUND_COLOR_DESC" name="background_gradient" type="astroidgradient" label="TPL_ASTROID_BACKGROUND_COLOR_LABEL"></field>
57+
<field ngShow="background_setting =='gradient'" description="ASTROID_SELECT_BACKGROUND_COLOR_DESC" name="background_gradient" type="astroidgradient" label="TPL_ASTROID_BG_GREDIENT_LABEL"></field>
5858

5959

6060
<field name="custom_colors" type="astroidtext" astroid-switch="true" default="0" label="ASTROID_ELEMENT_CUSTOM_COLORS_LABEL" />

astroid/astroid-framework/framework/elements/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</field>
5656
<field ngShow="background_setting =='video'" name="background_video" type="astroidmedia" media="videos" label="TPL_ASTROID_BACKGROUND_VIDEO_LABEL" description="TPL_ASTROID_BACKGROUND_VIDEO_DESC"/>
5757

58-
<field ngShow="background_setting =='gradient'" description="ASTROID_SELECT_BACKGROUND_COLOR_DESC" name="background_gradient" type="astroidgradient" label="TPL_ASTROID_BACKGROUND_COLOR_LABEL"></field>
58+
<field ngShow="background_setting =='gradient'" description="ASTROID_SELECT_BACKGROUND_COLOR_DESC" name="background_gradient" type="astroidgradient" label="TPL_ASTROID_BG_GREDIENT_LABEL"></field>
5959

6060
</fieldset>
6161
<fieldset name="responsive-settings" label="ASTROID_ELEMENT_HEAD_RESPONSIVE_SEETINGS_LABEL" addfieldpath="/libraries/astroid/framework/fields">

astroid/astroid-framework/framework/elements/section-default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
</field>
6767
<field ngShow="background_setting =='video'" name="background_video" type="astroidmedia" media="videos" label="TPL_ASTROID_BACKGROUND_VIDEO_LABEL" description="TPL_ASTROID_BACKGROUND_VIDEO_DESC"/>
6868

69-
<field ngShow="background_setting =='gradient'" description="ASTROID_SELECT_BACKGROUND_COLOR_DESC" name="background_gradient" type="astroidgradient" label="TPL_ASTROID_BACKGROUND_COLOR_LABEL"></field>
69+
<field ngShow="background_setting =='gradient'" description="ASTROID_SELECT_BACKGROUND_COLOR_DESC" name="background_gradient" type="astroidgradient" label="TPL_ASTROID_BG_GREDIENT_LABEL"></field>
7070

7171

7272
<field name="custom_colors" type="astroidtext" astroid-switch="true" default="0" label="ASTROID_ELEMENT_CUSTOM_COLORS_LABEL" />

astroid/astroid-framework/language/en-GB/en-GB.astroid.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ TPL_ASTROID_STICKY_ODD_NUMBER_POSITION_DESC="Select where you want to place the
274274

275275
; Color Tab
276276
TPL_ASTROID_BACKGROUND_COLOR_LABEL="Background Color"
277+
TPL_ASTROID_BG_GREDIENT_LABEL="Gradient Colors"
277278
TPL_ASTROID_HOVER_BACKGROUND_COLOR_LABEL="Hover Background Color"
278279
TPL_ASTROID_ACTIVE_BACKGROUND_COLOR_LABEL="Active Background Color"
279280
TPL_ASTROID_TEXT_COLOR_LABEL="Text Color"

astroid/astroid-template-zero/frontend/header/menu/link.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@
124124
<?php } ?>
125125
<?php } ?>
126126
<?php if (!$is_mobile_menu && $item->level == 1 && (($item->parent && $item->deeper == 1) || $options->megamenu)) { ?>
127-
<i class="fa fa-chevron-down nav-item-caret"></i>
127+
<?php if($template->params->get('dropdown_arrow', 0)) { ?>
128+
<i class="fa fa-chevron-down nav-item-caret"></i>
129+
<?php } ?>
128130
<?php } elseif (!$is_mobile_menu && $item->parent && !($item->type == "heading" || $item->type == "separator")) { ?>
129131
<i class="fa fa-chevron-right nav-item-caret"></i>
130132
<?php } ?>
Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
<?php
2+
/**
3+
* @package Helix Ultimate Framework
4+
* @author JoomShaper https://www.joomshaper.com
5+
* @copyright Copyright (c) 2010 - 2018 JoomShaper
6+
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
7+
*/
8+
9+
defined ('_JEXEC') or die();
10+
11+
JHtml::_('behavior.tabstate');
12+
JHtml::_('behavior.keepalive');
13+
JHtml::_('behavior.formvalidator');
14+
JHtml::_('formbehavior.chosen', '#jform_catid', null, array('disable_search_threshold' => 0));
15+
$this->tab_name = 'com-content-form';
16+
$this->ignore_fieldsets = array('image-intro', 'image-full', 'jmetadata', 'item_associations');
17+
18+
// Create shortcut to parameters.
19+
$params = $this->state->get('params');
20+
21+
//Blog Options
22+
$attribs = json_decode($this->item->attribs);
23+
// Article type option
24+
25+
$this->form->setValue('astroid_article_type', 'attribs' , (isset($attribs->astroid_article_type) && $attribs->astroid_article_type) ? $attribs->astroid_article_type : '');
26+
$this->form->setValue('astroid_article_video_type', 'attribs' , (isset($attribs->astroid_article_video_type) && $attribs->astroid_article_video_type) ? $attribs->astroid_article_video_type : 'standard');
27+
28+
$this->form->setValue('astroid_article_video_url', 'attribs' , (isset($attribs->astroid_article_video_url) && $attribs->astroid_article_video_url) ? $attribs->astroid_article_video_url : '');
29+
30+
$this->form->setValue('astroid_article_gallery_width', 'attribs' , (isset($attribs->astroid_article_gallery_width) && $attribs->astroid_article_gallery_width) ? $attribs->astroid_article_gallery_width : '');
31+
32+
$this->form->setValue('astroid_article_gallery_bullets', 'attribs' , (isset($attribs->astroid_article_gallery_bullets) && $attribs->astroid_article_gallery_bullets) ? $attribs->astroid_article_gallery_bullets : '');
33+
34+
$this->form->setValue('astroid_article_gallery_navigation', 'attribs' , (isset($attribs->astroid_article_gallery_navigation) && $attribs->astroid_article_gallery_navigation) ? $attribs->astroid_article_gallery_navigation : '');
35+
36+
$this->form->setValue('astroid_article_thumbnail', 'attribs' , (isset($attribs->astroid_article_thumbnail) && $attribs->astroid_article_thumbnail) ? $attribs->astroid_article_thumbnail : '');
37+
38+
$this->form->setValue('astroid_article_gallery_items', 'attribs' , (isset($attribs->astroid_article_gallery_items) && $attribs->astroid_article_gallery_items) ? $attribs->astroid_article_gallery_items : '');
39+
40+
$this->form->setValue('astroid_article_audio_source', 'attribs' , (isset($attribs->astroid_article_audio_source) && $attribs->astroid_article_audio_source) ? $attribs->astroid_article_audio_source : '');
41+
42+
43+
$this->form->setValue('astroid_article_audio_soundcloud', 'attribs' , (isset($attribs->astroid_article_audio_soundcloud) && $attribs->astroid_article_audio_soundcloud) ? $attribs->astroid_article_audio_soundcloud : '');
44+
45+
$this->form->setValue('astroid_article_audio_spotify', 'attribs' , (isset($attribs->astroid_article_audio_spotify) && $attribs->astroid_article_audio_spotify) ? $attribs->astroid_article_audio_spotify : '');
46+
47+
$this->form->setValue('astroid_article_review_heading', 'attribs' , (isset($attribs->astroid_article_review_heading) && $attribs->astroid_article_review_heading) ? $attribs->astroid_article_review_heading : '');
48+
49+
$this->form->setValue('astroid_article_review_summery', 'attribs' , (isset($attribs->astroid_article_review_summery) && $attribs->astroid_article_review_summery) ? $attribs->astroid_article_review_summery : '');
50+
51+
$this->form->setValue('astroid_article_review_good', 'attribs' , (isset($attribs->astroid_article_review_good) && $attribs->astroid_article_review_good) ? $attribs->astroid_article_review_good : '');
52+
53+
$this->form->setValue('astroid_article_review_bad', 'attribs' , (isset($attribs->astroid_article_review_bad) && $attribs->astroid_article_review_bad) ? $attribs->astroid_article_review_bad : '');
54+
55+
$this->form->setValue('astroid_article_review_rating', 'attribs' , (isset($attribs->astroid_article_review_rating) && $attribs->astroid_article_review_rating) ? $attribs->astroid_article_review_rating : '');
56+
57+
$this->form->setValue('astroid_article_button_action', 'attribs' , (isset($attribs->astroid_article_button_action) && $attribs->astroid_article_button_action) ? $attribs->astroid_article_button_action : '');
58+
59+
$this->form->setValue('astroid_article_button_link', 'attribs' , (isset($attribs->astroid_article_button_link) && $attribs->astroid_article_button_link) ? $attribs->astroid_article_button_link : '');
60+
61+
$this->form->setValue('astroid_article_review_criterias', 'attribs' , (isset($attribs->astroid_article_review_criterias) && $attribs->astroid_article_review_criterias) ? $attribs->astroid_article_review_criterias : '');
62+
63+
$this->form->setValue('astroid_article_quote_text', 'attribs' , (isset($attribs->astroid_article_quote_text) && $attribs->astroid_article_quote_text) ? $attribs->astroid_article_quote_text : '');
64+
65+
$this->form->setValue('astroid_article_quote_author', 'attribs' , (isset($attribs->astroid_article_quote_author) && $attribs->astroid_article_quote_author) ? $attribs->astroid_article_quote_author : '');
66+
67+
$this->form->setValue('astroid_article_badge', 'attribs' , (isset($attribs->astroid_article_badge) && $attribs->astroid_article_badge) ? $attribs->astroid_article_badge : '');
68+
69+
$this->form->setValue('astroid_article_badge_type', 'attribs' , (isset($attribs->astroid_article_badge_type) && $attribs->astroid_article_badge_type) ? $attribs->astroid_article_badge_type : '');
70+
71+
$this->form->setValue('astroid_article_badge_text', 'attribs' , (isset($attribs->astroid_article_badge_text) && $attribs->astroid_article_badge_text) ? $attribs->astroid_article_badge_text : '');
72+
73+
$this->form->setValue('astroid_article_badge_color', 'attribs' , (isset($attribs->astroid_article_badge_color) && $attribs->astroid_article_badge_color) ? $attribs->astroid_article_badge_color : '');
74+
75+
$this->form->setValue('astroid_readtime', 'attribs' , (isset($attribs->astroid_readtime) && $attribs->astroid_readtime) ? $attribs->astroid_readtime : '');
76+
$this->form->setValue('astroid_posttype', 'attribs' , (isset($attribs->astroid_posttype) && $attribs->astroid_posttype) ? $attribs->astroid_posttype : '');
77+
78+
$this->form->setValue('astroid_relatedposts', 'attribs' , (isset($attribs->astroid_relatedposts) && $attribs->astroid_relatedposts) ? $attribs->astroid_relatedposts : '');
79+
$this->form->setValue('astroid_socialshare', 'attribs' , (isset($attribs->astroid_socialshare) && $attribs->astroid_socialshare) ? $attribs->astroid_socialshare : '');
80+
81+
$this->form->setValue('astroid_comments', 'attribs' , (isset($attribs->astroid_comments) && $attribs->astroid_comments) ? $attribs->astroid_comments : '');
82+
$this->form->setValue('astroid_og_title', 'attribs' , (isset($attribs->astroid_og_title) && $attribs->astroid_og_title) ? $attribs->astroid_og_title : '');
83+
$this->form->setValue('astroid_og_desc', 'attribs' , (isset($attribs->astroid_og_desc) && $attribs->astroid_og_desc) ? $attribs->astroid_og_desc : '');
84+
$this->form->setValue('astroid_og_image', 'attribs' , (isset($attribs->astroid_og_image) && $attribs->astroid_og_image) ? $attribs->astroid_og_image : '');
85+
$this->form->setValue('astroid_authorinfo', 'attribs' , (isset($attribs->astroid_authorinfo) && $attribs->astroid_authorinfo) ? $attribs->astroid_authorinfo : '');
86+
// End Articles Type
87+
88+
// This checks if the editor config options have ever been saved. If they haven't they will fall back to the original settings.
89+
$editoroptions = isset($params->show_publishing_options);
90+
91+
if (!$editoroptions)
92+
{
93+
$params->show_urls_images_frontend = '0';
94+
}
95+
96+
JFactory::getDocument()->addScriptDeclaration("
97+
Joomla.submitbutton = function(task)
98+
{
99+
if (task == 'article.cancel' || document.formvalidator.isValid(document.getElementById('adminForm')))
100+
{
101+
" . $this->form->getField('articletext')->save() . "
102+
Joomla.submitform(task);
103+
}
104+
}
105+
");
106+
?>
107+
<div class="edit item-page<?php echo $this->pageclass_sfx; ?>">
108+
<?php if ($params->get('show_page_heading')) : ?>
109+
<div class="page-header">
110+
<h1>
111+
<?php echo $this->escape($params->get('page_heading')); ?>
112+
</h1>
113+
</div>
114+
<?php endif; ?>
115+
116+
<form action="<?php echo JRoute::_('index.php?option=com_content&a_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical com-content-adminForm">
117+
<fieldset>
118+
<?php echo JHtml::_('bootstrap.startTabSet', $this->tab_name, array('active' => 'editor')); ?>
119+
120+
<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'editor', JText::_('COM_CONTENT_ARTICLE_CONTENT')); ?>
121+
<?php echo $this->form->renderField('title'); ?>
122+
123+
<?php if (is_null($this->item->id)) : ?>
124+
<?php echo $this->form->renderField('alias'); ?>
125+
<?php endif; ?>
126+
127+
<?php echo $this->form->getInput('articletext'); ?>
128+
129+
<?php if ($this->captchaEnabled) : ?>
130+
<?php echo $this->form->renderField('captcha'); ?>
131+
<?php endif; ?>
132+
<?php echo JHtml::_('bootstrap.endTab'); ?>
133+
134+
<?php if ($params->get('show_urls_images_frontend')) : ?>
135+
<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'images', JText::_('COM_CONTENT_IMAGES_AND_URLS')); ?>
136+
137+
<div class="row">
138+
<div class="col-sm-6 mb-3">
139+
<?php echo $this->form->renderField('image_intro', 'images'); ?>
140+
<?php echo $this->form->renderField('image_intro_alt', 'images'); ?>
141+
<?php echo $this->form->renderField('image_intro_caption', 'images'); ?>
142+
<?php echo $this->form->renderField('float_intro', 'images'); ?>
143+
</div>
144+
145+
<div class="col-sm-6">
146+
<?php echo $this->form->renderField('image_fulltext', 'images'); ?>
147+
<?php echo $this->form->renderField('image_fulltext_alt', 'images'); ?>
148+
<?php echo $this->form->renderField('image_fulltext_caption', 'images'); ?>
149+
<?php echo $this->form->renderField('float_fulltext', 'images'); ?>
150+
</div>
151+
</div>
152+
153+
<hr>
154+
155+
<div class="row">
156+
<div class="col-sm-4 mb-3">
157+
<?php echo $this->form->renderField('urla', 'urls'); ?>
158+
<?php echo $this->form->renderField('urlatext', 'urls'); ?>
159+
<div class="control-group">
160+
<div class="controls">
161+
<?php echo $this->form->getInput('targeta', 'urls'); ?>
162+
</div>
163+
</div>
164+
</div>
165+
166+
<div class="col-sm-4 mb-3">
167+
<?php echo $this->form->renderField('urlb', 'urls'); ?>
168+
<?php echo $this->form->renderField('urlbtext', 'urls'); ?>
169+
<div class="control-group">
170+
<div class="controls">
171+
<?php echo $this->form->getInput('targetb', 'urls'); ?>
172+
</div>
173+
</div>
174+
</div>
175+
176+
<div class="col-sm-4 mb-3">
177+
<?php echo $this->form->renderField('urlc', 'urls'); ?>
178+
<?php echo $this->form->renderField('urlctext', 'urls'); ?>
179+
<div class="control-group">
180+
<div class="controls">
181+
<?php echo $this->form->getInput('targetc', 'urls'); ?>
182+
</div>
183+
</div>
184+
</div>
185+
</div>
186+
187+
<?php echo JHtml::_('bootstrap.endTab'); ?>
188+
<?php endif; ?>
189+
190+
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>
191+
192+
<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'publishing', JText::_('COM_CONTENT_PUBLISHING')); ?>
193+
<?php echo $this->form->renderField('catid'); ?>
194+
<?php echo $this->form->renderField('tags'); ?>
195+
<?php if ($params->get('save_history', 0)) : ?>
196+
<?php echo $this->form->renderField('version_note'); ?>
197+
<?php endif; ?>
198+
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
199+
<?php echo $this->form->renderField('created_by_alias'); ?>
200+
<?php endif; ?>
201+
<?php if ($this->item->params->get('access-change')) : ?>
202+
<?php echo $this->form->renderField('state'); ?>
203+
<?php echo $this->form->renderField('featured'); ?>
204+
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
205+
<?php echo $this->form->renderField('publish_up'); ?>
206+
<?php echo $this->form->renderField('publish_down'); ?>
207+
<?php endif; ?>
208+
<?php endif; ?>
209+
<?php echo $this->form->renderField('access'); ?>
210+
<?php if (is_null($this->item->id)) : ?>
211+
<div class="control-group">
212+
<div class="control-label">
213+
</div>
214+
<div class="controls">
215+
<?php echo JText::_('COM_CONTENT_ORDERING'); ?>
216+
</div>
217+
</div>
218+
<?php endif; ?>
219+
<?php echo JHtml::_('bootstrap.endTab'); ?>
220+
221+
<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'language', JText::_('JFIELD_LANGUAGE_LABEL')); ?>
222+
<?php echo $this->form->renderField('language'); ?>
223+
<?php echo JHtml::_('bootstrap.endTab'); ?>
224+
225+
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
226+
<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'metadata', JText::_('COM_CONTENT_METADATA')); ?>
227+
<?php echo $this->form->renderField('metadesc'); ?>
228+
<?php echo $this->form->renderField('metakey'); ?>
229+
<?php echo JHtml::_('bootstrap.endTab'); ?>
230+
<?php endif; ?>
231+
232+
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
233+
234+
<input type="hidden" name="task" value="">
235+
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>">
236+
<?php echo JHtml::_('form.token'); ?>
237+
</fieldset>
238+
<div class="btn-toolbar">
239+
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('article.save')">
240+
<span class="fa fa-check"></span> <?php echo JText::_('JSAVE') ?>
241+
</button>
242+
<button type="button" class="btn btn-secondary ml-2" onclick="Joomla.submitbutton('article.cancel')">
243+
<span class="fa fa-times"></span> <?php echo JText::_('JCANCEL') ?>
244+
</button>
245+
<?php if ($params->get('save_history', 0) && $this->item->id) : ?>
246+
<?php echo $this->form->getInput('contenthistory'); ?>
247+
<?php endif; ?>
248+
</div>
249+
</form>
250+
</div>

astroid/astroid-template-zero/js/vendor/jquery.jdmegamenu.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
}
6060
});
6161

62-
if (settings.dropdownArrows) {
63-
_megamenu.append('<span class="arrow" />');
64-
}
62+
// if (settings.dropdownArrows) {
63+
// _megamenu.append('<span class="arrow" />');
64+
// }
6565

6666
_megamenu.each(function () {
6767
var _content = $(this).find(settings.contentClass);

0 commit comments

Comments
 (0)