From 178e517c70529919b6e515b568417128a289d5c6 Mon Sep 17 00:00:00 2001 From: Dan Rosart Date: Sun, 4 Feb 2018 03:04:14 +0000 Subject: [PATCH] Add copy, mark submitted, and go link to callins page. --- .meteor/packages | 1 + .meteor/versions | 1 + callins.html | 10 ++++++++-- client/callins.coffee | 12 ++++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.meteor/packages b/.meteor/packages index f28951d34..ead8a1862 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -38,3 +38,4 @@ shell-server@0.3.0 babel-runtime@1.1.1 dynamic-import@0.2.0 ecmascript +zenorocha:clipboard diff --git a/.meteor/versions b/.meteor/versions index ba46789e8..890350af5 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -87,3 +87,4 @@ underscore@1.0.10 url@1.1.0 webapp@1.4.0 webapp-hashing@1.0.9 +zenorocha:clipboard@1.7.1 diff --git a/callins.html b/callins.html index ab9c3cd67..a04e4ec7f 100644 --- a/callins.html +++ b/callins.html @@ -40,9 +40,15 @@

Answer call-in queue

{{link id=target title="Chat room" chat=true icon="icon-comment" class="pull-right"}}{{link target}}{{#if hunt_link type target}}
 ↦ on hunt site + target="_blank">on hunt site + {{#if sessionNick}} + + + + {{/if}} + {{/if}} -
{{answer}}
{{#if backsolve}}(backsolve){{/if}}{{#if provided}}(provided){{/if}} +
{{answer}}
{{#if backsolve}}(backsolve){{/if}}{{#if provided}}(provided){{/if}} {{pretty_ts this.created}} {{#with lastAttempt type target}}{{pretty_ts timestamp}} ({{pretty_ts timestamp=timestamp style="brief duration"}}){{else}}-{{/with}} {{#if sessionNick}} diff --git a/client/callins.coffee b/client/callins.coffee index 740d1f2cf..3ae10ec32 100644 --- a/client/callins.coffee +++ b/client/callins.coffee @@ -42,6 +42,10 @@ Template.callins.helpers Template.callins.onRendered -> $("title").text("Answer queue") share.ensureNick() + this.clipboard = new Clipboard '.copy-and-go' + +Template.callins.onDestroyed -> + this.clipboard.destroy() Template.callins.events "click .bb-addquip-btn": (event, template) -> @@ -99,3 +103,11 @@ Template.callin_row.events object: template.get_callin_id(event) fields: submitted_to_hq: checked who: Session.get('nick') + + "click .copy-and-go": (event, template) -> + Meteor.call 'setField', + type: 'callins' + object: @_id + fields: submitted_to_hq: true + who: Session.get 'nick' +