Skip to content

Commit 81b9fea

Browse files
Merge pull request #29 from joomdev/dev
Version 2.1.0
2 parents 9f56033 + ef5260d commit 81b9fea

File tree

308 files changed

+21804
-2376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+21804
-2376
lines changed

LICENSE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
645645
GNU General Public License for more details.
646646

647647
You should have received a copy of the GNU General Public License
648-
along with this program. If not, see <http://www.gnu.org/licenses/>.
648+
along with this program. If not, see <https://www.gnu.org/licenses/>.
649649

650650
Also add information on how to contact you by electronic and paper mail.
651651

@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
664664
You should also get your employer (if you work as a programmer) or school,
665665
if any, to sign a "copyright disclaimer" for the program, if necessary.
666666
For more information on this, and how to apply and follow the GNU GPL, see
667-
<http://www.gnu.org/licenses/>.
667+
<https://www.gnu.org/licenses/>.
668668

669669
The GNU General Public License does not permit incorporating your program
670670
into proprietary programs. If your program is a subroutine library, you
671671
may consider it more useful to permit linking proprietary applications with
672672
the library. If this is what you want to do, use the GNU Lesser General
673673
Public License instead of this License. But first, please read
674-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
674+
<https://www.gnu.org/philosophy/why-not-lgpl.html>.

astroid/astroid-framework/assets/css/admin.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@
186186
.margin-left-50px{
187187
margin-left: 55px;
188188
}
189+
.margin-left-75px{
190+
margin-left: 75px;
191+
}
189192

190193
/* For Firefox */
191194
input[type='number'] {
@@ -200,4 +203,50 @@ input[type=number]::-webkit-outer-spin-button {
200203

201204
.astroid-typography-preview-container .astroid-typography-preview{
202205
overflow: scroll;
206+
}
207+
208+
.gradient-toolbar .sp-replacer{ width: 30px; height: 30px; }
209+
.gradient-preview-container{
210+
width: 200px;
211+
height: 200px;
212+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
213+
border: 1px solid #dededf;
214+
border-radius: 5px;
215+
margin-bottom: 10px;
216+
overflow: hidden;
217+
}
218+
.gradient-preview{
219+
width: 200px;
220+
height: 200px;
221+
}
222+
.gradient-toolbar{
223+
width: 200px;
224+
}
225+
.gradient-type{
226+
display: inline-block;
227+
}
228+
.gradient-type input[type=radio]{
229+
display: none;
230+
}
231+
.gradient-type img{
232+
width: 30px;
233+
opacity: 0.5;
234+
}
235+
.gradient-type label{
236+
width: 30px;
237+
height: 30px;
238+
display: inline-block;
239+
cursor: pointer;
240+
border-radius: 3px;
241+
overflow: hidden;
242+
}
243+
.gradient-type input[type=radio]:checked ~ img{
244+
opacity: 1;
245+
}
246+
.gradient-colors > div{
247+
display: inline-block;
248+
}
249+
.gradient-colors{
250+
display: inline-block;
251+
float: right;
203252
}

astroid/astroid-framework/assets/css/astroid-framework.css

Lines changed: 11907 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

astroid/astroid-framework/assets/css/astroid-framework.css.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
325 Bytes
Loading
2.12 KB
Loading

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

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,22 @@ astroidFramework.directive('colorPicker', function ($parse) {
342342
};
343343
});
344344

345+
astroidFramework.directive('colorSelector', function ($parse) {
346+
return {
347+
restrict: 'A',
348+
link: function (scope, element, attrs, ngModel) {
349+
if (typeof $ == 'undefined') {
350+
var $ = jQuery;
351+
}
352+
$(element).spectrum(spectrumConfig);
353+
354+
$(element).on('move.spectrum', function (e, tinycolor) {
355+
$(element).spectrum("set", tinycolor.toRgbString()).trigger('change');
356+
});
357+
},
358+
};
359+
});
360+
345361
astroidFramework.directive('animationSelector', function () {
346362
return {
347363
restrict: 'A',
@@ -363,10 +379,12 @@ astroidFramework.directive('selectUi', function () {
363379
if (typeof $ == 'undefined') {
364380
var $ = jQuery;
365381
}
382+
var _value = $(element).val();
366383
setTimeout(function () {
367384
var _placeholder = $(element).data('placeholder');
368385
_placeholder = typeof _placeholder == 'undefined' ? false : _placeholder;
369386
$(element).addClass('astroid-select-ui search selection').dropdown({placeholder: _placeholder, fullTextSearch: true});
387+
//$(element).val(_value).trigger('change');
370388
}, 200);
371389
},
372390
};
@@ -493,6 +511,32 @@ astroidFramework.directive('draggable', function () {
493511
};
494512
});
495513

514+
astroidFramework.directive('astroidDatetimepicker', function () {
515+
return {
516+
restrict: 'A',
517+
link: function (scope, element, attrs) {
518+
if (typeof $ == 'undefined') {
519+
var $ = jQuery;
520+
}
521+
$(element).datetimepicker({
522+
icons: {
523+
time: "far fa-clock",
524+
date: "far fa-calendar-alt",
525+
up: "fa fa-angle-up",
526+
down: "fa fa-angle-down",
527+
next: "fa fa-angle-right",
528+
previous: "fa fa-angle-left",
529+
today: "fa fa-bullseye",
530+
clear: 'far fa-trash-alt',
531+
close: 'fa fa-times'
532+
},
533+
format: 'MMMM Do YYYY, h:mm a',
534+
timeZone: TIMEZONE
535+
});
536+
}
537+
};
538+
});
539+
496540
astroidFramework.directive('droppable', function () {
497541
return {
498542
restrict: 'A',
@@ -625,6 +669,79 @@ astroidFramework.directive('astroidresponsive', ['$http', function ($http) {
625669
}, 50);
626670
}
627671
};
672+
setTimeout(function () {
673+
setValue()
674+
}, 100);
675+
}
676+
};
677+
}]);
678+
679+
680+
astroidFramework.directive('astroidgradient', ['$http', function ($http) {
681+
return {
682+
restrict: 'A',
683+
scope: true,
684+
require: 'ngModel',
685+
link: function ($scope, $element, $attrs, ngModel) {
686+
if (typeof $ == 'undefined') {
687+
var $ = jQuery;
688+
}
689+
690+
var _gradeintPicker = $($element).parent('.astroid-gradient');
691+
var _typeInput = $(_gradeintPicker).find('.gradient-type');
692+
var _startInput = $(_gradeintPicker).find('.start-color');
693+
var _stopInput = $(_gradeintPicker).find('.stop-color');
694+
var _preview = $(_gradeintPicker).find('.gradient-preview');
695+
var updatePreview = function () {
696+
var _start = _startInput.val();
697+
var _stop = _stopInput.val();
698+
var _type = 'linear';
699+
_typeInput.each(function () {
700+
if ($(this).is(':checked')) {
701+
_type = $(this).val();
702+
}
703+
});
704+
if (_type == 'radial') {
705+
var _gradiant = 'radial-gradient(' + _start + ', ' + _stop + ')';
706+
} else {
707+
var _gradiant = 'linear-gradient(to bottom, ' + _start + ' 0%, ' + _stop + ' 100%)';
708+
}
709+
_preview.css('background-image', _gradiant);
710+
711+
var _params = {type: 'linear', start: 'transparent', stop: 'transparent'};
712+
_params.type = _type;
713+
_params.start = _start;
714+
_params.stop = _stop;
715+
716+
_params = JSON.stringify(_params);
717+
ngModel.$setViewValue(_params);
718+
$($element).val(_params);
719+
$scope.$apply();
720+
}
721+
_typeInput.bind('change', updatePreview);
722+
_startInput.bind('change', updatePreview);
723+
_stopInput.bind('change', updatePreview);
724+
725+
var _initValue = false;
726+
var setValue = function () {
727+
if (!_initValue) {
728+
_initValue = true;
729+
if (typeof ngModel.$modelValue != 'undefined') {
730+
try {
731+
var _params = JSON.parse(ngModel.$modelValue);
732+
} catch (e) {
733+
var _params = {type: 'linear', start: 'transparent', stop: 'transparent'};
734+
}
735+
} else {
736+
var _params = {type: 'linear', start: 'transparent', stop: 'transparent'};
737+
}
738+
$(_gradeintPicker).find('.gradient-type[value=' + _params.type + ']').prop('checked', true);
739+
_startInput.spectrum("set", _params.start);
740+
_stopInput.spectrum("set", _params.stop);
741+
updatePreview();
742+
}
743+
};
744+
628745
setTimeout(function () {
629746
setValue()
630747
}, 100);

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

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,12 +635,19 @@ var Admin = new AstroidAdmin();
635635
initAstroidUploader();
636636
$('.astroid-code-editor-exit-fs').click(function () {
637637
$(this).parent('.head').parent('.astroid-code-editor').removeClass('full-screen');
638+
setTimeout(function () {
639+
var resizeEvent = window.document.createEvent('UIEvents');
640+
resizeEvent.initUIEvent('resize', true, false, window, 0);
641+
window.dispatchEvent(resizeEvent);
642+
}, 10);
638643
});
639644
$('.astroid-code-editor-fs').click(function () {
640645
$(this).parent('.astroid-code-editor').addClass('full-screen');
641646
setTimeout(function () {
642-
$(window).resize();
643-
}, 100);
647+
var resizeEvent = window.document.createEvent('UIEvents');
648+
resizeEvent.initUIEvent('resize', true, false, window, 0);
649+
window.dispatchEvent(resizeEvent);
650+
}, 10);
644651
});
645652
$('.astroid-preloader-field-select').click(function () {
646653
$(this).parent('.astroid-preloader-field').children('.astroid-preloaders-selector').addClass('open');
@@ -787,6 +794,10 @@ var Admin = new AstroidAdmin();
787794
};
788795

789796
var loadGoogleFont = function loadGoogleFont(_font, _dropdown, _preview) {
797+
if (_preview !== null) {
798+
_preview.parent('.astroid-typography-preview-container').siblings('.library-font-warning').addClass('d-none');
799+
}
800+
790801
var _isSystemFont = false;
791802
SYSTEM_FONTS.forEach(function (_sfont) {
792803
if (_font == _sfont) {
@@ -795,6 +806,22 @@ var Admin = new AstroidAdmin();
795806
}
796807
});
797808

809+
var _isLibraryFont = false;
810+
LIBRARY_FONTS.forEach(function (_ufont) {
811+
if (_font == _ufont) {
812+
_isLibraryFont = true;
813+
return false;
814+
}
815+
});
816+
817+
if (_isLibraryFont) {
818+
if (_preview !== null) {
819+
_preview.css('font-family', _font);
820+
_preview.parent('.astroid-typography-preview-container').siblings('.library-font-warning').removeClass('d-none');
821+
}
822+
return false;
823+
}
824+
798825
if (_isSystemFont) {
799826
if (_preview !== null) {
800827
_preview.css('font-family', _font);
@@ -837,7 +864,7 @@ var Admin = new AstroidAdmin();
837864
var getGoogleFonts = function getGoogleFonts() {
838865
$.ajax({
839866
method: "GET",
840-
url: BASE_URL + 'index.php?option=com_ajax&astroid=google-fonts',
867+
url: BASE_URL + 'index.php?option=com_ajax&astroid=google-fonts&template=' + TEMPLATE_NAME,
841868
success: function success(response) {
842869
$('.astroid-font-selector').find('.menu').html(response);
843870
setTimeout(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/assets/json/fa-icons.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)