primo commit
This commit is contained in:
7
media/com_osmap/css/admin-default.css
Normal file
7
media/com_osmap/css/admin-default.css
Normal file
@ -0,0 +1,7 @@
|
||||
#footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
[href='#attrib-footer'] {
|
||||
display: none !important;
|
||||
}
|
||||
401
media/com_osmap/css/admin.css
Normal file
401
media/com_osmap/css/admin.css
Normal file
@ -0,0 +1,401 @@
|
||||
.admin .page-title [class^="icon-"]:before,
|
||||
.admin .page-title [class*=" icon-"]:before {
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.osmap-menu-options {
|
||||
padding: 10px;
|
||||
padding-left: 27px;
|
||||
}
|
||||
|
||||
.osmap-menu-options label {
|
||||
cursor: move;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.osmap-menu-options input, .osmap-menu-options select {
|
||||
margin: 5px 5px 2px 0;
|
||||
}
|
||||
|
||||
.osmap-links {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.osmap-links .osmap-link {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.osmap-modal-status {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.osmap-modal-status .icon-star {
|
||||
color: #feb123;
|
||||
}
|
||||
|
||||
#osmap-items-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#osmap-items-container .btn-group [class^="icon-"],
|
||||
#osmap-items-container .btn-group [class*=" icon-"] {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.icon-osmap:before {
|
||||
content: '\f0c1';
|
||||
}
|
||||
|
||||
#osmap-items-container .small.silver {
|
||||
color: silver;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td.sitemapitem-link {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td.sitemapitem-name {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td.sitemapitem-link,
|
||||
#itemList .sitemapitem td.sitemapitem-name {
|
||||
padding-bottom: 14px;
|
||||
padding-top: 14px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td .sitemapitem-published,
|
||||
#itemList .sitemapitem td .sitemapitem-priority,
|
||||
#itemList .sitemapitem td .sitemapitem-changefreq {
|
||||
padding-bottom: 5px;
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td .sitemapitem-priority select,
|
||||
#itemList .sitemapitem td .sitemapitem-changefreq select {
|
||||
margin-bottom: -5px;
|
||||
margin-top: -6px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem.with-uid td {
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem.selected td {
|
||||
background-color: rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem-published,
|
||||
#itemList .sitemapitem-priority,
|
||||
#itemList .sitemapitem-changefreq {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem select {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem-priority select {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem-changefreq select {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
#itemList .updated {
|
||||
color: #00f;
|
||||
}
|
||||
|
||||
ul.ul_sortable {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
ul.ul_sortable li:hover {
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
ul.ul_sortable li {
|
||||
cursor: move;
|
||||
padding: 5px;
|
||||
-webkit-transition: background-color 0.2s;
|
||||
transition: background-color 0.2s;
|
||||
width: 99%;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.osmap-draggable td {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
ul.ul_sortable li label.menu_label {
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
ul.ul_sortable li.ui-sortable-helper {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
ul.ul_sortable li.ui-sortable-placeholder {
|
||||
border: 4px dashed #f6f6f6 !important;
|
||||
visibility: visible !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/* Spin Animation */
|
||||
@-moz-keyframes spin {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes spin {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.osmap-loading {
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding-top: 21px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 200px;
|
||||
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 100%);
|
||||
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 100%);
|
||||
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a6000000', endColorstr='#00000000', GradientType=0);
|
||||
}
|
||||
|
||||
.osmap-loading .spin {
|
||||
-webkit-animation: spin 0.9s infinite linear;
|
||||
-moz-animation: spin 0.9s infinite linear;
|
||||
animation: spin 0.9s infinite linear;
|
||||
}
|
||||
|
||||
.sitemapitem .icon-warning {
|
||||
color: #ff911f;
|
||||
}
|
||||
|
||||
#item-form.sitemap .controls {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.osmap-table {
|
||||
max-width: 100%;
|
||||
background-color: transparent;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.osmap-list-header,
|
||||
.osmap-list-header .osmap-menu-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.osmap-menu-item:nth-child(odd) {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.osmap-table .osmap-cell {
|
||||
line-height: 18px;
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
padding: 8px 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.osmap-cell label {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-selected {
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-title {
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-priority {
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-changefreq {
|
||||
width: 140px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-priority .chzn-container,
|
||||
.osmap-cell.osmap-col-changefreq .chzn-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.osmap-links .icon-new-tab,
|
||||
.sitemapitem-link .icon-new-tab {
|
||||
color: #b5b5b5;
|
||||
}
|
||||
|
||||
span.level-mark {
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.sitemapitem-link .osmap-item-uid {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.osmap-info {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
body.com_osmap .form-horizontal .controls {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
.osmap-cell.osmap-col-title {
|
||||
width: 190px;
|
||||
}
|
||||
|
||||
#j-main-container {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.osmap-table .osmap-cell {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-selected {
|
||||
margin-left: 3%;
|
||||
width: 10%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-title {
|
||||
width: 87%;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-selected,
|
||||
.osmap-cell.osmap-col-title {
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-priority {
|
||||
width: 30%;
|
||||
margin-left: 13%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-changefreq {
|
||||
margin-left: 3%;
|
||||
width: 54%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-priority,
|
||||
.osmap-cell.osmap-col-changefreq {
|
||||
padding-top: 0;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-changefreq:before,
|
||||
.osmap-cell.osmap-col-priority:before {
|
||||
display: inline;
|
||||
font-weight: normal;
|
||||
content: attr(data-title);
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-priority .chzn-container {
|
||||
width: 70px !important;
|
||||
}
|
||||
|
||||
.osmap-cell.osmap-col-changefreq .chzn-container {
|
||||
width: 120px !important;
|
||||
}
|
||||
|
||||
.osmap-list-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.osmap-cell label {
|
||||
font-weight: bold !important;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td.center {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td.center:first-of-type {
|
||||
width: 14px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td.sitemapitem-link {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td.sitemapitem-name {
|
||||
width: 65px;
|
||||
}
|
||||
|
||||
#itemList {
|
||||
table-layout: fixed;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#itemList thead {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 320px) {
|
||||
#itemList .sitemapitem td.center:first-of-type {
|
||||
width: 5px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#itemList .sitemapitem td.center:last-of-type {
|
||||
width: 9px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
letter-spacing: 30px;
|
||||
}
|
||||
|
||||
.sitemapitem {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
1
media/com_osmap/css/admin.min.css
vendored
Normal file
1
media/com_osmap/css/admin.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
66
media/com_osmap/css/field_customfooter.css
Normal file
66
media/com_osmap/css/field_customfooter.css
Normal file
@ -0,0 +1,66 @@
|
||||
.joomlashack-footer {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.joomlashack-footer.installer {
|
||||
margin-top: 20px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.joomlashack-footer .gopro-ad {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.joomlashack-footer .gopro-ad a.gopto-btn {
|
||||
border-radius: 3px;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
vertical-align: middle;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
border: none;
|
||||
line-height: 40px;
|
||||
min-height: 40px;
|
||||
padding: 0 12px;
|
||||
background: #075c97;
|
||||
color: #ffffff;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
transition: background 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.joomlashack-footer .gopro-ad .icon-publish:before {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.joomlashack-footer .joomlashack-jedlink {
|
||||
margin: 30px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.joomlashack-footer .joomlashack-jedlink .icon-star {
|
||||
color: #feb123;
|
||||
}
|
||||
|
||||
.joomlashack-footer .joomlashack-jedlink.installer {
|
||||
margin-left: 0;
|
||||
text-align: left;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.joomlashack-footer .joomlashack-copyright {
|
||||
color: #808080;
|
||||
font-size: 10px;
|
||||
margin: 2px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.joomlashack-footer .poweredby {
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.joomlashack-footer img.alledia-logo {
|
||||
width: 100px;
|
||||
}
|
||||
111
media/com_osmap/css/installer.css
Normal file
111
media/com_osmap/css/installer.css
Normal file
@ -0,0 +1,111 @@
|
||||
.joomlashack-wrapper {
|
||||
position: relative;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
padding: 0px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-button {
|
||||
color: #ffffff;
|
||||
display: inline-block;
|
||||
box-sizing: border-box !important;
|
||||
cursor: pointer;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
vertical-align: middle;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
border: none;
|
||||
line-height: 40px;
|
||||
min-height: 40px;
|
||||
padding: 0 18px;
|
||||
background: #075c97;
|
||||
color: #ffffff;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
||||
font-weight: 300;
|
||||
font-size: 14px;
|
||||
-webkit-transition: background 0.2s ease-in-out;
|
||||
transition: background 0.2s ease-in-out;
|
||||
margin-top: 15px;
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
-o-border-radius: 3px;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-empty-key-msg {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-details-container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper #joomlashack-installer-license-success {
|
||||
font-size: 18px;
|
||||
color: #075c97;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper #joomlashack-installer-license-error {
|
||||
font-size: 16px;
|
||||
color: #974646;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-related-table {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 7px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-related-table th {
|
||||
background: #f6f6f6;
|
||||
font-weight: bold;
|
||||
line-height: 38px;
|
||||
padding: 5px 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-related-table tr {
|
||||
padding: 3px 0;
|
||||
box-sizing: border-box;
|
||||
line-height: 34px;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-related-table td {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-footer {
|
||||
box-sizing: border-box;
|
||||
height: auto;
|
||||
margin-bottom: 65px;
|
||||
margin-top: 30px;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-license {
|
||||
color: gray;
|
||||
font-size: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .joomlashack-warning {
|
||||
background: #fcf8e3;
|
||||
border: 1px solid #faebcc;
|
||||
border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
-o-border-radius: 2px;
|
||||
padding: 10px;
|
||||
color: #8a6d3b;
|
||||
}
|
||||
|
||||
.joomlashack-wrapper .copyright {
|
||||
font-size: 10px;
|
||||
color: #808080;
|
||||
}
|
||||
3
media/com_osmap/css/sitemap_html.css
Normal file
3
media/com_osmap/css/sitemap_html.css
Normal file
@ -0,0 +1,3 @@
|
||||
.osmap-items ul {
|
||||
margin: 0 0 9px 25px;
|
||||
}
|
||||
1
media/com_osmap/css/sitemap_html.min.css
vendored
Normal file
1
media/com_osmap/css/sitemap_html.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osmap-items ul{margin:0 0 9px 25px}
|
||||
54
media/com_osmap/css/sitemap_html_debug.css
Normal file
54
media/com_osmap/css/sitemap_html_debug.css
Normal file
@ -0,0 +1,54 @@
|
||||
.osmap-debug .osmap-items {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.osmap-debug ul {
|
||||
border-left: 1px solid #eaeaea;
|
||||
border-right: 1px solid #eaeaea;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
margin-top: 10px !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.osmap-debug h2 {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.osmap-debug h2 div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.osmap-debug-item {
|
||||
padding: 10px 8px;
|
||||
margin-left: 0;
|
||||
list-style-position: inside;
|
||||
border-top: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
.osmap-debug-item.even {
|
||||
background: #f3f3f3;
|
||||
}
|
||||
|
||||
.osmap-debug-box {
|
||||
font-size: 12px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.osmap-debug-box * {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.osmap-debug-box div > span {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.osmap-debug-sitemap,
|
||||
.osmap-debug-items-count {
|
||||
padding: 10px;
|
||||
background: #f1ffa4;
|
||||
border-top: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
.osmap-debug-item a.osmap-link {
|
||||
font-weight: bold;
|
||||
}
|
||||
1
media/com_osmap/css/sitemap_html_debug.min.css
vendored
Normal file
1
media/com_osmap/css/sitemap_html_debug.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osmap-debug-box div>span,.osmap-debug-item a.osmap-link{font-weight:700}.osmap-debug .osmap-items{padding-right:20px}.osmap-debug ul{border-left:1px solid #eaeaea;border-right:1px solid #eaeaea;border-bottom:1px solid #eaeaea;margin-top:10px!important;margin-bottom:10px!important}.osmap-debug h2{margin-left:20px}.osmap-debug h2 div{font-size:12px}.osmap-debug-item{padding:10px 8px;margin-left:0;list-style-position:inside;border-top:1px solid #eaeaea}.osmap-debug-item.even{background:#f3f3f3}.osmap-debug-box{font-size:12px;padding-left:20px}.osmap-debug-box *{color:#666}.osmap-debug-items-count,.osmap-debug-sitemap{padding:10px;background:#f1ffa4;border-top:1px solid #eaeaea}
|
||||
BIN
media/com_osmap/fonts/alledia-install.eot
Normal file
BIN
media/com_osmap/fonts/alledia-install.eot
Normal file
Binary file not shown.
197
media/com_osmap/js/sitemapitems.js
Normal file
197
media/com_osmap/js/sitemapitems.js
Normal file
@ -0,0 +1,197 @@
|
||||
/**
|
||||
* @package OSMap
|
||||
* @contact www.joomlashack.com, help@joomlashack.com
|
||||
* @copyright 2007-2014 XMap - Joomla! Vargas - Guillermo Vargas. All rights reserved.
|
||||
* @copyright 2016-2024 Joomlashack.com. All rights reserved.
|
||||
* @license https://www.gnu.org/licenses/gpl.html GNU/GPL
|
||||
*
|
||||
* This file is part of OSMap.
|
||||
*
|
||||
* OSMap is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* OSMap is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with OSMap. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
$.osmap = $.extend({}, $.osmap);
|
||||
|
||||
/**
|
||||
* @param {Object} params
|
||||
*/
|
||||
$.osmap.sitemapItems = function(params) {
|
||||
this.$container = $(params.container);
|
||||
this.params = params;
|
||||
this.url = params.baseUri.replace(/\/$/, '')
|
||||
+ '/index.php?option=com_osmap&view=adminsitemapitems&tmpl=component&id=' + params.sitemapId;
|
||||
|
||||
if (params.language !== '') {
|
||||
this.url += '&lang=' + params.language;
|
||||
}
|
||||
|
||||
// Init the change frequency dropdown template
|
||||
this.$frequencyField = $('<select>');
|
||||
for (let value in params.frequencies) {
|
||||
$('<option>')
|
||||
.attr('value', value)
|
||||
.text(params.frequencies[value])
|
||||
.appendTo(this.$frequencyField)
|
||||
}
|
||||
|
||||
// Init the priority dropdown template
|
||||
this.$priorityField = $('<select>');
|
||||
for (let value of params.priorities) {
|
||||
$('<option>')
|
||||
.attr('value', value)
|
||||
.text(value)
|
||||
.appendTo(this.$priorityField)
|
||||
}
|
||||
|
||||
this.load();
|
||||
};
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
$.osmap.sitemapItems.prototype.load = function() {
|
||||
let self = this;
|
||||
|
||||
$.ajax({
|
||||
url : this.url,
|
||||
async : true,
|
||||
success: function(data) {
|
||||
self.$container.html(data);
|
||||
|
||||
self.configureForm();
|
||||
|
||||
$('.osmap-loading').remove();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
$.osmap.sitemapItems.prototype.configureForm = function() {
|
||||
let self = this,
|
||||
$itemRows = $('tr.sitemapitem', this.$container);
|
||||
|
||||
$itemRows
|
||||
.on('mouseenter', function() {
|
||||
self.setDropdown($('.sitemapitem-priority', this), self.$priorityField);
|
||||
self.setDropdown($('.sitemapitem-changefreq', this), self.$frequencyField);
|
||||
|
||||
$(this).addClass('selected');
|
||||
})
|
||||
.on('mouseleave', function() {
|
||||
self.clearDropdown($('.sitemapitem-priority', this));
|
||||
self.clearDropdown($('.sitemapitem-changefreq', this));
|
||||
|
||||
$(this).removeClass('selected');
|
||||
});
|
||||
|
||||
this.initPublishing();
|
||||
|
||||
$('.hasTooltip').tooltip();
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {jQuery} $cells
|
||||
* @param {jQuery} $template
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
$.osmap.sitemapItems.prototype.setDropdown = function($cells, $template) {
|
||||
$cells.each(function() {
|
||||
let $this = $(this),
|
||||
$input = $template.clone().val($this.data('value'));
|
||||
$(this).html('').append($input);
|
||||
|
||||
$input.on('change', function() {
|
||||
let $this = $(this);
|
||||
|
||||
$this.parent().data('value', $this.val());
|
||||
$this.parents('tr').addClass('updated');
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {jQuery} $cells
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
$.osmap.sitemapItems.prototype.clearDropdown = function($cells) {
|
||||
$cells.text($cells.data('value'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
$.osmap.sitemapItems.prototype.initPublishing = function() {
|
||||
$('.sitemapitem-published', this.$container).on('click', function() {
|
||||
let $this = $(this),
|
||||
newValue = $this.data('value') === 1 ? 0 : 1,
|
||||
spanClass = newValue === 1 ? 'publish' : 'unpublish',
|
||||
$span = $('span', this);
|
||||
|
||||
$this.data('value', newValue);
|
||||
$this.parents('.sitemapitem').addClass('updated');
|
||||
|
||||
$span
|
||||
.removeClass()
|
||||
.addClass('hasTooltip icon-' + spanClass)
|
||||
.attr(
|
||||
'title',
|
||||
newValue === 1
|
||||
? Joomla.JText._('COM_OSMAP_TOOLTIP_CLICK_TO_UNPUBLISH')
|
||||
: Joomla.JText._('COM_OSMAP_TOOLTIP_CLICK_TO_PUBLISH')
|
||||
);
|
||||
|
||||
if (typeof $.fn.tooltip.Constructor.VERSION === 'undefined') {
|
||||
// Assume older bootstrap
|
||||
$span.tooltip('fixTitle');
|
||||
}
|
||||
|
||||
$span.attr('data-bs-original-title', $span.attr('title')).tooltip('show');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} task
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
Joomla.submitbutton = function(task) {
|
||||
let form = document.getElementById('adminForm');
|
||||
|
||||
if (task === 'sitemapitems.save' || task === 'sitemapitems.apply') {
|
||||
let $updateField = $('#update-data'),
|
||||
$updatedItems = $('.sitemapitem.updated'),
|
||||
updates = [];
|
||||
|
||||
$updatedItems.each(function() {
|
||||
updates.push({
|
||||
'uid' : this.dataset.uid || null,
|
||||
'settings_hash': this.dataset.settingsHash || null,
|
||||
'published' : $('.sitemapitem-published', this).data('value'),
|
||||
'priority' : $('.sitemapitem-priority', this).data('value'),
|
||||
'changefreq' : $('.sitemapitem-changefreq', this).data('value')
|
||||
});
|
||||
});
|
||||
|
||||
$updateField.val(JSON.stringify(updates));
|
||||
}
|
||||
|
||||
Joomla.submitform(task, form);
|
||||
};
|
||||
})(jQuery);
|
||||
9
media/com_osmap/js/sitemapitems.min.js
vendored
Normal file
9
media/com_osmap/js/sitemapitems.min.js
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
;(function($){$.osmap=$.extend({},$.osmap);$.osmap.sitemapItems=function(params){this.$container=$(params.container);this.params=params;this.url=params.baseUri.replace(/\/$/,'')
|
||||
+'/index.php?option=com_osmap&view=adminsitemapitems&tmpl=component&id='+params.sitemapId;if(params.language!==''){this.url+='&lang='+params.language;}
|
||||
this.$frequencyField=$('<select>');for(let value in params.frequencies){$('<option>').attr('value',value).text(params.frequencies[value]).appendTo(this.$frequencyField)}
|
||||
this.$priorityField=$('<select>');for(let value of params.priorities){$('<option>').attr('value',value).text(value).appendTo(this.$priorityField)}
|
||||
this.load();};$.osmap.sitemapItems.prototype.load=function(){let self=this;$.ajax({url:this.url,async:true,success:function(data){self.$container.html(data);self.configureForm();$('.osmap-loading').remove();}});};$.osmap.sitemapItems.prototype.configureForm=function(){let self=this,$itemRows=$('tr.sitemapitem',this.$container);$itemRows.on('mouseenter',function(){self.setDropdown($('.sitemapitem-priority',this),self.$priorityField);self.setDropdown($('.sitemapitem-changefreq',this),self.$frequencyField);$(this).addClass('selected');}).on('mouseleave',function(){self.clearDropdown($('.sitemapitem-priority',this));self.clearDropdown($('.sitemapitem-changefreq',this));$(this).removeClass('selected');});this.initPublishing();$('.hasTooltip').tooltip();};$.osmap.sitemapItems.prototype.setDropdown=function($cells,$template){$cells.each(function(){let $this=$(this),$input=$template.clone().val($this.data('value'));$(this).html('').append($input);$input.on('change',function(){let $this=$(this);$this.parent().data('value',$this.val());$this.parents('tr').addClass('updated');});});};$.osmap.sitemapItems.prototype.clearDropdown=function($cells){$cells.text($cells.data('value'));}
|
||||
$.osmap.sitemapItems.prototype.initPublishing=function(){$('.sitemapitem-published',this.$container).on('click',function(){let $this=$(this),newValue=$this.data('value')===1?0:1,spanClass=newValue===1?'publish':'unpublish',$span=$('span',this);$this.data('value',newValue);$this.parents('.sitemapitem').addClass('updated');$span.removeClass().addClass('hasTooltip icon-'+spanClass).attr('title',newValue===1?Joomla.JText._('COM_OSMAP_TOOLTIP_CLICK_TO_UNPUBLISH'):Joomla.JText._('COM_OSMAP_TOOLTIP_CLICK_TO_PUBLISH'));if(typeof $.fn.tooltip.Constructor.VERSION==='undefined'){$span.tooltip('fixTitle');}
|
||||
$span.attr('data-bs-original-title',$span.attr('title')).tooltip('show');});}
|
||||
Joomla.submitbutton=function(task){let form=document.getElementById('adminForm');if(task==='sitemapitems.save'||task==='sitemapitems.apply'){let $updateField=$('#update-data'),$updatedItems=$('.sitemapitem.updated'),updates=[];$updatedItems.each(function(){updates.push({'uid':this.dataset.uid||null,'settings_hash':this.dataset.settingsHash||null,'published':$('.sitemapitem-published',this).data('value'),'priority':$('.sitemapitem-priority',this).data('value'),'changefreq':$('.sitemapitem-changefreq',this).data('value')});});$updateField.val(JSON.stringify(updates));}
|
||||
Joomla.submitform(task,form);};})(jQuery);
|
||||
Reference in New Issue
Block a user