Started implementing sharing support
This commit is contained in:
13
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
13
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="HtmlUnknownAttribute" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="0" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
7
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
7
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||
<option name="USE_PROJECT_PROFILE" value="true" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
@@ -0,0 +1,24 @@
|
||||
<template name="shareDialog">
|
||||
<div>
|
||||
<div>
|
||||
{{#each readers}}
|
||||
|
||||
{{/each}}
|
||||
{{#each writers}}
|
||||
|
||||
{{/each}}
|
||||
</div>
|
||||
<paper-input id="userNameOrEmailInput" label="Username or email" floatinglabel></paper-input>
|
||||
<br>
|
||||
<paper-dropdown-menu id="accessLevelDropdown" label="Access Level">
|
||||
<paper-dropdown layered class="dropdown">
|
||||
<core-menu id="accessLevelMenu" class="menu" selected="read" on-tap="onStatMenuTap">
|
||||
<paper-item name="read"> View Only </paper-item>
|
||||
<paper-item name="write"> Can Edit </paper-item>
|
||||
</core-menu>
|
||||
</paper-dropdown>
|
||||
</paper-dropdown-menu>
|
||||
<br>
|
||||
<paper-button id="shareButton" class="red-button" raised>Share</paper-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,29 @@
|
||||
Template.shareDialog.helpers({
|
||||
|
||||
});
|
||||
|
||||
Template.shareDialog.events({
|
||||
"tap #shareButton": function(event, instance){
|
||||
var self = this;
|
||||
var userName = instance.find("#userNameOrEmailInput").value;
|
||||
var permission = instance.find("#accessLevelMenu").value;
|
||||
Meteor.call("getUserId", userName, function (err, result) {
|
||||
if(err){
|
||||
this.userFindError = true;
|
||||
} else{
|
||||
if(permission === "write"){
|
||||
Characters.update(self._id, {
|
||||
$push: {writers: result},
|
||||
$pull: {readers: result}
|
||||
});
|
||||
} else {
|
||||
Characters.update(self._id, {
|
||||
$push: {readers: result},
|
||||
$pull: {writers: result}
|
||||
});
|
||||
}
|
||||
GlobalUI.closeDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -33,4 +33,11 @@ Template.characterSheet.events({
|
||||
template: "deleteCharacterConfirmation",
|
||||
});
|
||||
},
|
||||
"tap #shareCharacter": function(event, instance){
|
||||
GlobalUI.showDialog({
|
||||
heading: "Share " + this.name,
|
||||
data: this,
|
||||
template: "shareDialog",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
Package.describe({
|
||||
name: "velocity:test-proxy",
|
||||
summary: "Dynamically created package to expose test files to mirrors",
|
||||
version: "0.0.4",
|
||||
debugOnly: true
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
api.use("coffeescript", ["client", "server"]);
|
||||
api.add_files("tests/mocha/server/lib/characterUtility.js",["server"]);
|
||||
api.add_files("tests/mocha/server/model/character/character.js",["server"]);
|
||||
api.add_files("tests/mocha/server/model/character/effects.js",["server"]);
|
||||
api.add_files("tests/mocha/server/sampleServerTest.js",["server"]);
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
../../tests
|
||||
Reference in New Issue
Block a user