mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 07:40:43 +01:00
closes #2639
This commit is contained in:
@@ -52,6 +52,8 @@
|
||||
"invalid-title": "Invalid title!",
|
||||
"too-many-posts": "You can only post once every %1 seconds - please wait before posting again",
|
||||
"too-many-posts-newbie": "As a new user, you can only post once every %1 seconds until you have earned %2 reputation - please wait before posting again",
|
||||
"tag-too-short": "Please enter a longer tag. Tags should contain at least %1 characters",
|
||||
"tag-too-long": "Please enter a shorter tag. Tags can't be longer than %1 characters",
|
||||
"file-too-big": "Maximum allowed file size is %1 kbs - please upload a smaller file",
|
||||
|
||||
"cant-vote-self-post": "You cannot vote for your own post",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"no_tag_topics": "There are no topics with this tag.",
|
||||
"tags": "Tags",
|
||||
"enter_tags_here": "Enter tags here. Press enter after each tag.",
|
||||
"enter_tags_here": "Enter tags here. %1-%2 characters. Press enter after each tag.",
|
||||
"enter_tags_here_short": "Enter tags...",
|
||||
"no_tags": "There are no tags yet."
|
||||
}
|
||||
@@ -228,6 +228,8 @@ define('composer', [
|
||||
var data = {
|
||||
allowTopicsThumbnail: allowTopicsThumbnail,
|
||||
showTags: isTopic || isMain,
|
||||
minimumTagLength: config.minimumTagLength,
|
||||
maximumTagLength: config.maximumTagLength,
|
||||
isTopic: isTopic,
|
||||
showHandleInput: (app.user.uid === 0 || (isEditing && isGuestPost && app.user.isAdmin)) && config.allowGuestHandles,
|
||||
handle: composer.posts[post_uuid] ? composer.posts[post_uuid].handle || '' : undefined
|
||||
|
||||
@@ -14,7 +14,17 @@ define('composer/tags', function() {
|
||||
|
||||
tagEl.tagsinput({
|
||||
maxTags: config.tagsPerTopic,
|
||||
confirmKeys: [13, 44]
|
||||
confirmKeys: [13, 44],
|
||||
trimValue: true
|
||||
});
|
||||
|
||||
tagEl.on('beforeItemAdd', function(event) {
|
||||
event.cancel = event.item.length < config.minimumTagLength || event.item.length > config.maximumTagLength;
|
||||
if (event.item.length < config.minimumTagLength) {
|
||||
app.alertError('[[error:tag-too-short, ' + config.minimumTagLength + ']]');
|
||||
} else if (event.item.length > config.maximumTagLength) {
|
||||
app.alertError('[[error:tag-too-long, ' + config.maximumTagLength + ']]');
|
||||
}
|
||||
});
|
||||
|
||||
tagEl.on('itemAdded', function(event) {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
border-radius: 4px;
|
||||
max-width: 100%;
|
||||
line-height: 22px;
|
||||
cursor: text;
|
||||
}
|
||||
.bootstrap-tagsinput input {
|
||||
border: none;
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
public/vendor/jquery/bootstrap-tagsinput/bootstrap-tagsinput.min.js.map
vendored
Normal file
1
public/vendor/jquery/bootstrap-tagsinput/bootstrap-tagsinput.min.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dist/bootstrap-tagsinput-angular.min.js","sources":["src/bootstrap-tagsinput-angular.js"],"names":["angular","module","directive","getItemProperty","scope","property","isFunction","$parent","item","undefined","restrict","model","template","replace","link","element","attrs","$","isArray","select","typeaheadSourceArray","typeaheadSource","split","length","tagsinput","options","typeahead","source","itemValue","itemvalue","itemText","itemtext","confirmKeys","confirmkeys","JSON","parse","tagClass","tagclass","i","on","event","indexOf","push","idx","splice","prev","slice","$watch","added","filter","removed"],"mappings":";;;;;AAAAA,QAAQC,OAAO,0BACdC,UAAU,sBAAuB,WAEhC,QAASC,GAAgBC,EAAOC,GAC9B,MAAKA,GAGDL,QAAQM,WAAWF,EAAMG,QAAQF,IAC5BD,EAAMG,QAAQF,GAEhB,SAASG,GACd,MAAOA,GAAKH,IANLI,OAUX,OACEC,SAAU,KACVN,OACEO,MAAO,YAETC,SAAU,6BACVC,SAAS,EACTC,KAAM,SAASV,EAAOW,EAASC,GAC7BC,EAAE,WACKjB,QAAQkB,QAAQd,EAAMO,SACzBP,EAAMO,SAER,IAAIQ,GAASF,EAAE,SAAUF,GACrBK,EAAuBJ,EAAMK,gBAAk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K,UAAU,SAAU0B,EAAQZ,GAOrC,KAHAnB,EAAOK,UAAU,WAGZc,EAAI,EAAGA,EAAIU,EAAMzB,OAAQe,IAC5BnB,EAAOK,UAAU,MAAOwB,EAAMV,MAE/B"}
|
||||
@@ -43,6 +43,8 @@ apiController.getConfig = function(req, res, next) {
|
||||
config.maxReconnectionAttempts = meta.config.maxReconnectionAttempts || 5;
|
||||
config.reconnectionDelay = meta.config.reconnectionDelay || 200;
|
||||
config.tagsPerTopic = meta.config.tagsPerTopic || 5;
|
||||
config.minimumTagLength = meta.config.minimumTagLength || 3;
|
||||
config.maximumTagLength = meta.config.maximumTagLength || 15;
|
||||
config.topicsPerPage = meta.config.topicsPerPage || 20;
|
||||
config.postsPerPage = meta.config.postsPerPage || 20;
|
||||
config.maximumFileSize = meta.config.maximumFileSize;
|
||||
|
||||
Reference in New Issue
Block a user