Skip to content

Commit

Permalink
craft 3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
marionnewlevant committed Nov 25, 2017
1 parent f806979 commit c87352d
Show file tree
Hide file tree
Showing 31 changed files with 781 additions and 610 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Snitch Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.0 - 2017.03.14
### Added
- Initial release for Craft 3
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2017 Marion Newlevant

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 changes: 0 additions & 21 deletions LICENSE.txt

This file was deleted.

37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
# MN Snitch plugin for Craft CMS
# Snitch plugin for Craft CMS 3.x

MN Snitch watches entry, category, and global set editors, and lets you know when someone else may also be editing the same thing at the same time.
Snitch watches entry, category, and global set editors, and lets you know when someone else may also be editing the same thing at the same time.

## Installation

To install MN Snitch, follow these steps:
To install Snitch, follow these steps:

1. Download & unzip the file and place the `mnsnitch` directory into your `craft/plugins` directory
2. Install plugin in the Craft Control Panel under Settings > Plugins
1. Download & unzip the file and place the `snitch` directory into your `craft/plugins` directory
2. -OR- install with Composer via `composer require marionnewlevant/snitch`
3. Install plugin in the Craft Control Panel under Settings > Plugins

## What You See
Snitch works on Craft 3.x.

## Snitch Overview

Snitch works by injecting a javascript file into backend pages. That javascript looks for an element edit window or
a modal element edit window, and when it detects one, asks the server to report any collisions.

A warning banner appears at the top of the editor pane when someone else may be editing the same element:

![Screenshot](screenshots/ElementBanner.png)
![Screenshot](resources/img/warning.png)

A warning banner also appears at the top of editor modals:

![Screenshot](screenshots/ModalBanner.png)
![Screenshot](resources/img/modalWarning.png)

Clicking the `X` will dismiss the banner
Clicking the `X` will dismiss the banner.

## Configuration
## Configuring Snitch

The default configuration can be overridden with a config file in `craft/config/mnsnitch.php`. This is a standard Craft config file, with the usual multienvironment support. The configurable values are:
The default configuration can be overridden with a config file in `craft/config/snitch.php`. This is a standard Craft config file, with the usual multienvironment support. The configurable values are:

- `serverPollInterval`: interval (in seconds) for polling server to look for newly arrived conflicts. Default value: `15`
- `serverPollInterval`: interval (in seconds) for polling server to look for newly arrived conflicts. Default value: `2`
- `message`: text for the warning banner. The text `{user}` will be replace with a mailto link to the conflicting user. Default value: `May also be edited by: {user}.`
- `inputIdSelector`: the css selector for identifying the hidden inputs which indicate an element edit window or modal elment edit window.

## MN Snitch Changelog

### 1.0.0 -- 2016.09.06

* Initial release
The visual look of the warning banners can be modifed with the `cpcss` plugin.

Brought to you by [Marion Newlevant](http://marion.newlevant.com)
33 changes: 33 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "marionnewlevant/snitch",
"description": "Report when two people might be editing the same entry, category, or global",
"version": "2.0.0",
"type": "craft-plugin",
"keywords": [
"craft", "craftcms", "craft-plugin", "snitch"
],
"license": "MIT",
"authors": [
{
"name": "Marion Newlevant",
"homepage": "http://marion.newlevant.com"
}
],
"require": {
},
"autoload": {
"psr-4": {
"marionnewlevant\\snitch\\": "src/"
}
},
"extra": {
"name": "Snitch",
"handle": "snitch",
"version": "2.0.0",
"schemaVersion": "1.0.0",
"hasSettings": false,
"hasCpSection": false,
"documentationUrl": "https://github.com/marionnewlevant/craft-snitch/blob/v2/README.md",
"changelogUrl": "https://raw.githubusercontent.com/marionnewlevant/craft-snitch/v2/CHANGELOG.md"
}
}
133 changes: 0 additions & 133 deletions mnsnitch/MnSnitchPlugin.php

This file was deleted.

10 changes: 0 additions & 10 deletions mnsnitch/config.php

This file was deleted.

36 changes: 0 additions & 36 deletions mnsnitch/controllers/MnSnitchController.php

This file was deleted.

35 changes: 0 additions & 35 deletions mnsnitch/models/MnSnitchModel.php

This file was deleted.

Loading

0 comments on commit c87352d

Please sign in to comment.