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;'
|
||||
}, [
|
||||
m('div', m('a.pseudo.button.full', {
|
||||
href: '/kategori/' + cat.id,
|
||||
oncreate: m.route.link
|
||||
style: 'cursor: pointer;',
|
||||
onclick: function() {
|
||||
m.route.set('/kategori/' + cat.id)
|
||||
}
|
||||
}, [
|
||||
m('i.fa.fa-edit.fa-fw'),
|
||||
m('span', {
|
||||
|
@ -9,11 +9,16 @@ var listAdmin = {
|
||||
view: function() {
|
||||
return m('.flex.four-900.full.card-wrapper', [
|
||||
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) {
|
||||
return m('.fourth-900.half-600.card.box', {style:'background-color:' + pengumuman.background}, [
|
||||
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':
|
||||
pengumuman.categoryName
|
||||
+ "\nAktif: "
|
||||
@ -24,7 +29,9 @@ var listAdmin = {
|
||||
+ 'Diubah: '
|
||||
+ 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,
|
||||
' - ',
|
||||
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', 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('span', {style: 'font-size:smaller'}, 'Ubah')
|
||||
])),
|
||||
|
@ -5,7 +5,12 @@ let cookie = require('../others/cookie')
|
||||
var nav = {
|
||||
view: function() {
|
||||
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('label.burger.pseudo.button', {for: 'bmenug'}, m('i.fa.fa-bars', {'aria-hidden': 'true'})),
|
||||
m('.menu#menu', [
|
||||
@ -18,9 +23,11 @@ var nav = {
|
||||
})
|
||||
),
|
||||
m('a.navy.button', {
|
||||
href: '/kategori',
|
||||
'data-tooltip': 'Kategori',
|
||||
oncreate: m.route.link
|
||||
style: 'cursor: pointer;',
|
||||
onclick: function() {
|
||||
m.route.set('/kategori')
|
||||
}
|
||||
}, [
|
||||
m('i.fa.fa-list-ul', {
|
||||
'aria-hidden': 'true'
|
||||
@ -28,9 +35,11 @@ var nav = {
|
||||
' Kategori'
|
||||
]),
|
||||
cookie.get('signal') == 1 ? m('a.navy.button', {
|
||||
href: '/register',
|
||||
'data-tooltip': 'User Baru',
|
||||
oncreate: m.route.link
|
||||
style: 'cursor: pointer;',
|
||||
onclick: function() {
|
||||
m.route.set('/register')
|
||||
}
|
||||
}, [
|
||||
m('i.fa.fa-user-plus', {
|
||||
'aria-hidden': 'true'
|
||||
|
@ -4,21 +4,29 @@ var secondaryNav = {
|
||||
view: function() {
|
||||
return m('.filter.flex.six-600.four.grow', [
|
||||
m('.sixth-600.none', ''),
|
||||
m('div', m('a[href=/posts].navy', {
|
||||
oncreate: m.route.link,
|
||||
style: 'font-size:smaller;'
|
||||
m('div', m('a.navy', {
|
||||
style: 'cursor: pointer; font-size: smaller;',
|
||||
onclick: function() {
|
||||
m.route.set('')
|
||||
}
|
||||
}, 'Semua')),
|
||||
m('div', m('a[href=/posts/active].navy', {
|
||||
oncreate: m.route.link,
|
||||
style: 'font-size:smaller;'
|
||||
m('div', m('a.navy', {
|
||||
style: 'cursor: pointer; font-size: smaller;',
|
||||
onclick: function() {
|
||||
m.route.set('/posts/active')
|
||||
}
|
||||
}, 'Aktif')),
|
||||
m('div', m('a[href=/posts/soon].navy', {
|
||||
oncreate: m.route.link,
|
||||
style: 'font-size:smaller;'
|
||||
m('div', m('a.navy', {
|
||||
style: 'cursor: pointer; font-size: smaller;',
|
||||
onclick: function() {
|
||||
m.route.set('/posts/soon')
|
||||
}
|
||||
}, 'Belum Aktif')),
|
||||
m('div', m('a[href=/posts/inactive].navy', {
|
||||
oncreate: m.route.link,
|
||||
style: 'font-size:smaller;'
|
||||
m('div', m('a.navy', {
|
||||
style: 'cursor: pointer; font-size: smaller;',
|
||||
onclick: function() {
|
||||
m.route.set('/posts/inactive')
|
||||
}
|
||||
}, 'Nonaktif')),
|
||||
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': {
|
||||
view: function(vnode) {
|
||||
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