Correct user assignment
This commit is contained in:
parent
40f869e7c3
commit
a7299e84fc
|
@ -317,14 +317,13 @@ const removeExtraInputs = () => {
|
||||||
|
|
||||||
class _LobstersFunction {
|
class _LobstersFunction {
|
||||||
constructor () {
|
constructor () {
|
||||||
this.curUser = 'will'; // remove line when done with production
|
this.curUser = document.body.getAttribute('data-username');
|
||||||
// this.curUser = null, //for finished product
|
|
||||||
|
|
||||||
this.storyFlagReasons = ({<%= Vote::STORY_REASONS.map{|k,v|
|
this.storyFlagReasons = ({<%= Vote::STORY_REASONS.map{|k,v|
|
||||||
"#{k.inspect}: #{v.inspect}" }.join(", ") %>});
|
"#{k.inspect}: #{v.inspect}" }.join(", ") %>});
|
||||||
|
|
||||||
this.commentFlagReasons = ({<%= Vote::COMMENT_REASONS.map{|k,v|
|
this.commentFlagReasons = ({<%= Vote::COMMENT_REASONS.map{|k,v|
|
||||||
"#{k.inspect}: #{v.inspect}" }.join(", ") %>});
|
"#{k.inspect}: #{v.inspect}" }.join(", ") %>});
|
||||||
}
|
}
|
||||||
|
|
||||||
bounceToLogin() {
|
bounceToLogin() {
|
||||||
|
@ -346,7 +345,7 @@ class _LobstersFunction {
|
||||||
|
|
||||||
checkStoryTitle() { //partial removal (due to select2)
|
checkStoryTitle() { //partial removal (due to select2)
|
||||||
const titleLocation = document.getElementById('story_title');
|
const titleLocation = document.getElementById('story_title');
|
||||||
if(!titleLocation) return;
|
if (!titleLocation) return;
|
||||||
|
|
||||||
const title = titleLocation.value;
|
const title = titleLocation.value;
|
||||||
if (!title) return;
|
if (!title) return;
|
||||||
|
@ -543,12 +542,12 @@ class _LobstersFunction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const Lobster = new _LobstersFunction();
|
|
||||||
|
|
||||||
onPageLoad(() => {
|
onPageLoad(() => {
|
||||||
|
|
||||||
// Global Functions
|
// Global Functions
|
||||||
|
|
||||||
|
const Lobster = new _LobstersFunction();
|
||||||
|
|
||||||
on('click', '.markdown_help_label', (event) => {
|
on('click', '.markdown_help_label', (event) => {
|
||||||
parentSelector(event.target, '.markdown_help_toggler').querySelector('.markdown_help').classList.toggle('display-block');
|
parentSelector(event.target, '.markdown_help_toggler').querySelector('.markdown_help').classList.toggle('display-block');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue