Updated: no <a> tag with href, converted to onclick event
This commit is contained in:
parent
9acec91229
commit
c0ea05faee
@ -73,8 +73,10 @@ var createCategory = {
|
|||||||
style: 'margin: 0;'
|
style: 'margin: 0;'
|
||||||
}, [
|
}, [
|
||||||
m('div', m('a.pseudo.button.full', {
|
m('div', m('a.pseudo.button.full', {
|
||||||
href: '/kategori/' + cat.id,
|
style: 'cursor: pointer;',
|
||||||
oncreate: m.route.link
|
onclick: function() {
|
||||||
|
m.route.set('/kategori/' + cat.id)
|
||||||
|
}
|
||||||
}, [
|
}, [
|
||||||
m('i.fa.fa-edit.fa-fw'),
|
m('i.fa.fa-edit.fa-fw'),
|
||||||
m('span', {
|
m('span', {
|
||||||
|
@ -9,11 +9,16 @@ var listAdmin = {
|
|||||||
view: function() {
|
view: function() {
|
||||||
return m('.flex.four-900.full.card-wrapper', [
|
return m('.flex.four-900.full.card-wrapper', [
|
||||||
post.loading ? m(Loading) :
|
post.loading ? m(Loading) :
|
||||||
m('a.fourth-900.half-600.card.box.new', {href:'/posts/entry', oncreate: m.route.link}, m('i.fa.fa-plus.fa-3x', '')),
|
m('.fourth-900.half-600.card.box.new', {
|
||||||
|
style: 'cursor: pointer; color: lightseagreen',
|
||||||
|
onclick: function() {
|
||||||
|
m.route.set('/posts/entry')
|
||||||
|
}
|
||||||
|
}, m('i.fa.fa-plus.fa-3x', '')),
|
||||||
post.list.map(function(pengumuman) {
|
post.list.map(function(pengumuman) {
|
||||||
return m('.fourth-900.half-600.card.box', {style:'background-color:' + pengumuman.background}, [
|
return m('.fourth-900.half-600.card.box', {style:'background-color:' + pengumuman.background}, [
|
||||||
m('span.stack', {
|
m('span.stack', {
|
||||||
style:'font-size: smaller; color:rgba(17,17,17,.4);',
|
style:'font-size: small; color:rgba(17,17,17,.4);',
|
||||||
'data-tooltip':
|
'data-tooltip':
|
||||||
pengumuman.categoryName
|
pengumuman.categoryName
|
||||||
+ "\nAktif: "
|
+ "\nAktif: "
|
||||||
@ -24,7 +29,9 @@ var listAdmin = {
|
|||||||
+ 'Diubah: '
|
+ 'Diubah: '
|
||||||
+ fecha.format(fecha.parse(pengumuman.edited_at, 'YYYY-MM-DD H:i:s'), 'DD/MM/YYYY')
|
+ fecha.format(fecha.parse(pengumuman.edited_at, 'YYYY-MM-DD H:i:s'), 'DD/MM/YYYY')
|
||||||
}, [
|
}, [
|
||||||
m('em', [
|
m('em', {
|
||||||
|
style: 'color: ' + pengumuman.foreground
|
||||||
|
}, [
|
||||||
pengumuman.creatorName,
|
pengumuman.creatorName,
|
||||||
' - ',
|
' - ',
|
||||||
fecha.format(fecha.parse(pengumuman.created_at, 'YYYY-MM-DD H:i:s'), 'DD/MM/YYYY')
|
fecha.format(fecha.parse(pengumuman.created_at, 'YYYY-MM-DD H:i:s'), 'DD/MM/YYYY')
|
||||||
@ -32,7 +39,12 @@ var listAdmin = {
|
|||||||
]),
|
]),
|
||||||
m('span.stack', {style:'color:' + pengumuman.foreground + '; overflow-y: auto;'}, m.trust(marked(pengumuman.content))),
|
m('span.stack', {style:'color:' + pengumuman.foreground + '; overflow-y: auto;'}, m.trust(marked(pengumuman.content))),
|
||||||
m('span', m('footer.flex.full.grow', (pengumuman.status != 0) ? pengumuman.creator == window.location.search.split('&')[1].slice('2') || cookie.get('signal') == 1 ? [
|
m('span', m('footer.flex.full.grow', (pengumuman.status != 0) ? pengumuman.creator == window.location.search.split('&')[1].slice('2') || cookie.get('signal') == 1 ? [
|
||||||
m('.half-900', m('a.button.full', {href: '/posts/edit/' + pengumuman.id, oncreate: m.route.link}, [
|
m('.half-900', m('a.button.full', {
|
||||||
|
style: 'cursor: pointer;',
|
||||||
|
onclick: function() {
|
||||||
|
m.route.set('/posts/edit/' + pengumuman.id)
|
||||||
|
}
|
||||||
|
}, [
|
||||||
m('i.fa.fa-edit.fa-fw', ''),
|
m('i.fa.fa-edit.fa-fw', ''),
|
||||||
m('span', {style: 'font-size:smaller'}, 'Ubah')
|
m('span', {style: 'font-size:smaller'}, 'Ubah')
|
||||||
])),
|
])),
|
||||||
|
@ -5,7 +5,12 @@ let cookie = require('../others/cookie')
|
|||||||
var nav = {
|
var nav = {
|
||||||
view: function() {
|
view: function() {
|
||||||
return m('nav', [
|
return m('nav', [
|
||||||
m('span.brand', m('a.title', {href: '', oncreate: m.route.link}, 'Live Info')),
|
m('span.brand', m('a.title', {
|
||||||
|
style: 'cursor: pointer;',
|
||||||
|
onclick: function() {
|
||||||
|
m.route.set('')
|
||||||
|
}
|
||||||
|
}, 'Live Info')),
|
||||||
m('input#bmenug.show', {type: 'checkbox'}),
|
m('input#bmenug.show', {type: 'checkbox'}),
|
||||||
m('label.burger.pseudo.button', {for: 'bmenug'}, m('i.fa.fa-bars', {'aria-hidden': 'true'})),
|
m('label.burger.pseudo.button', {for: 'bmenug'}, m('i.fa.fa-bars', {'aria-hidden': 'true'})),
|
||||||
m('.menu#menu', [
|
m('.menu#menu', [
|
||||||
@ -18,9 +23,11 @@ var nav = {
|
|||||||
})
|
})
|
||||||
),
|
),
|
||||||
m('a.navy.button', {
|
m('a.navy.button', {
|
||||||
href: '/kategori',
|
|
||||||
'data-tooltip': 'Kategori',
|
'data-tooltip': 'Kategori',
|
||||||
oncreate: m.route.link
|
style: 'cursor: pointer;',
|
||||||
|
onclick: function() {
|
||||||
|
m.route.set('/kategori')
|
||||||
|
}
|
||||||
}, [
|
}, [
|
||||||
m('i.fa.fa-list-ul', {
|
m('i.fa.fa-list-ul', {
|
||||||
'aria-hidden': 'true'
|
'aria-hidden': 'true'
|
||||||
@ -28,9 +35,11 @@ var nav = {
|
|||||||
' Kategori'
|
' Kategori'
|
||||||
]),
|
]),
|
||||||
cookie.get('signal') == 1 ? m('a.navy.button', {
|
cookie.get('signal') == 1 ? m('a.navy.button', {
|
||||||
href: '/register',
|
|
||||||
'data-tooltip': 'User Baru',
|
'data-tooltip': 'User Baru',
|
||||||
oncreate: m.route.link
|
style: 'cursor: pointer;',
|
||||||
|
onclick: function() {
|
||||||
|
m.route.set('/register')
|
||||||
|
}
|
||||||
}, [
|
}, [
|
||||||
m('i.fa.fa-user-plus', {
|
m('i.fa.fa-user-plus', {
|
||||||
'aria-hidden': 'true'
|
'aria-hidden': 'true'
|
||||||
|
@ -4,21 +4,29 @@ var secondaryNav = {
|
|||||||
view: function() {
|
view: function() {
|
||||||
return m('.filter.flex.six-600.four.grow', [
|
return m('.filter.flex.six-600.four.grow', [
|
||||||
m('.sixth-600.none', ''),
|
m('.sixth-600.none', ''),
|
||||||
m('div', m('a[href=/posts].navy', {
|
m('div', m('a.navy', {
|
||||||
oncreate: m.route.link,
|
style: 'cursor: pointer; font-size: smaller;',
|
||||||
style: 'font-size:smaller;'
|
onclick: function() {
|
||||||
|
m.route.set('')
|
||||||
|
}
|
||||||
}, 'Semua')),
|
}, 'Semua')),
|
||||||
m('div', m('a[href=/posts/active].navy', {
|
m('div', m('a.navy', {
|
||||||
oncreate: m.route.link,
|
style: 'cursor: pointer; font-size: smaller;',
|
||||||
style: 'font-size:smaller;'
|
onclick: function() {
|
||||||
|
m.route.set('/posts/active')
|
||||||
|
}
|
||||||
}, 'Aktif')),
|
}, 'Aktif')),
|
||||||
m('div', m('a[href=/posts/soon].navy', {
|
m('div', m('a.navy', {
|
||||||
oncreate: m.route.link,
|
style: 'cursor: pointer; font-size: smaller;',
|
||||||
style: 'font-size:smaller;'
|
onclick: function() {
|
||||||
|
m.route.set('/posts/soon')
|
||||||
|
}
|
||||||
}, 'Belum Aktif')),
|
}, 'Belum Aktif')),
|
||||||
m('div', m('a[href=/posts/inactive].navy', {
|
m('div', m('a.navy', {
|
||||||
oncreate: m.route.link,
|
style: 'cursor: pointer; font-size: smaller;',
|
||||||
style: 'font-size:smaller;'
|
onclick: function() {
|
||||||
|
m.route.set('/posts/inactive')
|
||||||
|
}
|
||||||
}, 'Nonaktif')),
|
}, 'Nonaktif')),
|
||||||
m('.sixth-600.none', '')
|
m('.sixth-600.none', '')
|
||||||
])
|
])
|
||||||
|
@ -64,16 +64,6 @@ if (page == '') {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'/posts': { view: function() {
|
|
||||||
return m('span',
|
|
||||||
window.message || window.message != null ?
|
|
||||||
m(label) : null,
|
|
||||||
[
|
|
||||||
m(nav),
|
|
||||||
m(showPost, { 'status': 3 })
|
|
||||||
])
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'/posts/edit/:id': {
|
'/posts/edit/:id': {
|
||||||
view: function(vnode) {
|
view: function(vnode) {
|
||||||
return m('span',
|
return m('span',
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user