Merge branch 'feature/4-commenting-on-photos' of aheathershaw/blue-twilight into master
No files matched your search
@@ -123,6 +123,12 @@ class Album extends Model
|
||||
}
|
||||
}
|
||||
|
||||
if (is_null($current->parent_album_id) && $current->is_permissions_inherited)
|
||||
{
|
||||
// Use default permissions list
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $current->id;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AlbumDefaultAnonymousPermission extends Model
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AlbumDefaultGroupPermission extends Model
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AlbumDefaultUserPermission extends Model
|
||||
{
|
||||
}
|
||||
@@ -98,6 +98,8 @@ class ConfigHelper
|
||||
return array(
|
||||
'albums_menu_parents_only' => false,
|
||||
'albums_menu_number_items' => 10,
|
||||
'allow_photo_comments' => false,
|
||||
'allow_photo_comments_anonymous' => true,
|
||||
'allow_self_registration' => true,
|
||||
'analytics_code' => '',
|
||||
'app_name' => trans('global.app_name'),
|
||||
@@ -111,6 +113,10 @@ class ConfigHelper
|
||||
'hotlink_protection' => false,
|
||||
'items_per_page' => 12,
|
||||
'items_per_page_admin' => 10,
|
||||
'moderate_anonymous_users' => true,
|
||||
'moderate_known_users' => true,
|
||||
'photo_comments_allowed_html' => 'p,div,span,a,b,i,u',
|
||||
'photo_comments_thread_depth' => 3,
|
||||
'public_statistics' => true,
|
||||
'recaptcha_enabled_registration' => false,
|
||||
'recaptcha_secret_key' => '',
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
namespace App\Helpers;
|
||||
|
||||
use App\Album;
|
||||
use App\AlbumDefaultAnonymousPermission;
|
||||
use App\AlbumDefaultGroupPermission;
|
||||
use App\AlbumDefaultUserPermission;
|
||||
use App\Permission;
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -50,6 +53,23 @@ class PermissionsHelper
|
||||
->count() > 0;
|
||||
}
|
||||
|
||||
public function usersWhoCan_Album(Album $album, $permission)
|
||||
{
|
||||
$users = DB::table('album_permissions_cache')
|
||||
->join('permissions', 'permissions.id', '=', 'album_permissions_cache.permission_id')
|
||||
->where([
|
||||
['album_permissions_cache.album_id', $album->id],
|
||||
['permissions.section', 'album'],
|
||||
['permissions.description', $permission]
|
||||
])
|
||||
->get();
|
||||
|
||||
// Include the album's owner (who can do everything)
|
||||
$users->push($album->user);
|
||||
|
||||
return $users;
|
||||
}
|
||||
|
||||
private function rebuildAlbumCache()
|
||||
{
|
||||
// Get a list of albums
|
||||
@@ -60,6 +80,10 @@ class PermissionsHelper
|
||||
$albumGroupPermissions = DB::table('album_group_permissions')->get();
|
||||
$albumAnonPermissions = DB::table('album_anonymous_permissions')->get();
|
||||
|
||||
$defaultAlbumUserPermissions = AlbumDefaultUserPermission::all();
|
||||
$defaultAlbumGroupPermissions = AlbumDefaultGroupPermission::all();
|
||||
$defaultAnonPermissions = AlbumDefaultAnonymousPermission::all();
|
||||
|
||||
// Get a list of all user->group memberships
|
||||
$userGroups = DB::table('user_groups')->get();
|
||||
|
||||
@@ -71,60 +95,109 @@ class PermissionsHelper
|
||||
{
|
||||
$effectiveAlbumID = $album->effectiveAlbumIDForPermissions();
|
||||
|
||||
$anonymousPermissions = array_filter($albumAnonPermissions->toArray(), function($item) use ($effectiveAlbumID)
|
||||
if ($effectiveAlbumID === 0)
|
||||
{
|
||||
return ($item->album_id == $effectiveAlbumID);
|
||||
});
|
||||
/* Use the default permissions list */
|
||||
|
||||
foreach ($anonymousPermissions as $anonymousPermission)
|
||||
{
|
||||
$permissionsCache[] = [
|
||||
'album_id' => $album->id,
|
||||
'permission_id' => $anonymousPermission->permission_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
];
|
||||
}
|
||||
|
||||
$userPermissions = array_filter($albumUserPermissions->toArray(), function($item) use ($effectiveAlbumID)
|
||||
{
|
||||
return ($item->album_id == $effectiveAlbumID);
|
||||
});
|
||||
|
||||
foreach ($userPermissions as $userPermission)
|
||||
{
|
||||
$permissionsCache[] = [
|
||||
'user_id' => $userPermission->user_id,
|
||||
'album_id' => $album->id,
|
||||
'permission_id' => $userPermission->permission_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
];
|
||||
}
|
||||
|
||||
$groupPermissions = array_filter($albumGroupPermissions->toArray(), function($item) use ($effectiveAlbumID)
|
||||
{
|
||||
return ($item->album_id == $effectiveAlbumID);
|
||||
});
|
||||
|
||||
foreach ($groupPermissions as $groupPermission)
|
||||
{
|
||||
// Get a list of users in this group, and add one per user
|
||||
$usersInGroup = array_filter($userGroups->toArray(), function($item) use ($groupPermission)
|
||||
{
|
||||
return $item->group_id = $groupPermission->group_id;
|
||||
});
|
||||
|
||||
foreach ($usersInGroup as $userGroup)
|
||||
foreach ($defaultAnonPermissions as $anonymousPermission)
|
||||
{
|
||||
$permissionsCache[] = [
|
||||
'user_id' => $userGroup->user_id,
|
||||
'album_id' => $album->id,
|
||||
'permission_id' => $groupPermission->permission_id,
|
||||
'permission_id' => $anonymousPermission->permission_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($defaultAlbumUserPermissions as $userPermission)
|
||||
{
|
||||
$permissionsCache[] = [
|
||||
'user_id' => $userPermission->user_id,
|
||||
'album_id' => $album->id,
|
||||
'permission_id' => $userPermission->permission_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($defaultAlbumGroupPermissions as $groupPermission)
|
||||
{
|
||||
// Get a list of users in this group, and add one per user
|
||||
$usersInGroup = array_filter($userGroups->toArray(), function ($item) use ($groupPermission)
|
||||
{
|
||||
return $item->group_id = $groupPermission->group_id;
|
||||
});
|
||||
|
||||
foreach ($usersInGroup as $userGroup)
|
||||
{
|
||||
$permissionsCache[] = [
|
||||
'user_id' => $userGroup->user_id,
|
||||
'album_id' => $album->id,
|
||||
'permission_id' => $groupPermission->permission_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the specified album-specific permissions */
|
||||
$anonymousPermissions = array_filter($albumAnonPermissions->toArray(), function ($item) use ($effectiveAlbumID)
|
||||
{
|
||||
return ($item->album_id == $effectiveAlbumID);
|
||||
});
|
||||
|
||||
foreach ($anonymousPermissions as $anonymousPermission)
|
||||
{
|
||||
$permissionsCache[] = [
|
||||
'album_id' => $album->id,
|
||||
'permission_id' => $anonymousPermission->permission_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
];
|
||||
}
|
||||
|
||||
$userPermissions = array_filter($albumUserPermissions->toArray(), function ($item) use ($effectiveAlbumID)
|
||||
{
|
||||
return ($item->album_id == $effectiveAlbumID);
|
||||
});
|
||||
|
||||
foreach ($userPermissions as $userPermission)
|
||||
{
|
||||
$permissionsCache[] = [
|
||||
'user_id' => $userPermission->user_id,
|
||||
'album_id' => $album->id,
|
||||
'permission_id' => $userPermission->permission_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
];
|
||||
}
|
||||
|
||||
$groupPermissions = array_filter($albumGroupPermissions->toArray(), function ($item) use ($effectiveAlbumID)
|
||||
{
|
||||
return ($item->album_id == $effectiveAlbumID);
|
||||
});
|
||||
|
||||
foreach ($groupPermissions as $groupPermission)
|
||||
{
|
||||
// Get a list of users in this group, and add one per user
|
||||
$usersInGroup = array_filter($userGroups->toArray(), function ($item) use ($groupPermission)
|
||||
{
|
||||
return $item->group_id = $groupPermission->group_id;
|
||||
});
|
||||
|
||||
foreach ($usersInGroup as $userGroup)
|
||||
{
|
||||
$permissionsCache[] = [
|
||||
'user_id' => $userGroup->user_id,
|
||||
'album_id' => $album->id,
|
||||
'permission_id' => $groupPermission->permission_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Album;
|
||||
use App\AlbumDefaultAnonymousPermission;
|
||||
use App\AlbumDefaultGroupPermission;
|
||||
use App\AlbumDefaultUserPermission;
|
||||
use App\AlbumRedirect;
|
||||
use App\Facade\Theme;
|
||||
use App\Facade\UserConfig;
|
||||
@@ -28,6 +31,30 @@ use Illuminate\Support\Facades\View;
|
||||
|
||||
class AlbumController extends Controller
|
||||
{
|
||||
public static function doesGroupHaveDefaultPermission(Group $group, Permission $permission)
|
||||
{
|
||||
return AlbumDefaultGroupPermission::where([
|
||||
'group_id' => $group->id,
|
||||
'permission_id' => $permission->id
|
||||
])->count() > 0;
|
||||
}
|
||||
|
||||
public static function doesUserHaveDefaultPermission($user, Permission $permission)
|
||||
{
|
||||
// User will be null for anonymous users
|
||||
if (is_null($user))
|
||||
{
|
||||
return AlbumDefaultAnonymousPermission::where(['permission_id' => $permission->id])->count() > 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return AlbumDefaultUserPermission::where([
|
||||
'user_id' => $user->id,
|
||||
'permission_id' => $permission->id
|
||||
])->count() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
@@ -83,6 +110,41 @@ class AlbumController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function defaultPermissions()
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-albums');
|
||||
|
||||
$addNewGroups = [];
|
||||
$existingGroups = [];
|
||||
foreach (Group::orderBy('name')->get() as $group)
|
||||
{
|
||||
if (AlbumDefaultGroupPermission::where('group_id', $group->id)->count() == 0)
|
||||
{
|
||||
$addNewGroups[] = $group;
|
||||
}
|
||||
else
|
||||
{
|
||||
$existingGroups[] = $group;
|
||||
}
|
||||
}
|
||||
|
||||
$existingUsers = [];
|
||||
foreach (User::orderBy('name')->get() as $user)
|
||||
{
|
||||
if (AlbumDefaultUserPermission::where('user_id', $user->id)->count() > 0)
|
||||
{
|
||||
$existingUsers[] = $user;
|
||||
}
|
||||
}
|
||||
|
||||
return Theme::render('admin.album_default_permissions', [
|
||||
'add_new_groups' => $addNewGroups,
|
||||
'all_permissions' => Permission::where('section', 'album')->get(),
|
||||
'existing_groups' => $existingGroups,
|
||||
'existing_users' => $existingUsers
|
||||
]);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-albums');
|
||||
@@ -215,6 +277,130 @@ class AlbumController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function setDefaultGroupPermissions(Request $request)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-albums');
|
||||
|
||||
if ($request->get('action') == 'add_group' && $request->has('group_id'))
|
||||
{
|
||||
/* Add a new group to the default permission list */
|
||||
|
||||
/** @var Group $group */
|
||||
$group = Group::where('id', $request->get('group_id'))->first();
|
||||
if (is_null($group))
|
||||
{
|
||||
App::abort(404);
|
||||
}
|
||||
|
||||
// Link all default permissions to the group
|
||||
/** @var Permission $permission */
|
||||
foreach (Permission::where(['section' => 'album', 'is_default' => true])->get() as $permission)
|
||||
{
|
||||
$defaultPermission = new AlbumDefaultGroupPermission();
|
||||
$defaultPermission->group_id = $group->id;
|
||||
$defaultPermission->permission_id = $permission->id;
|
||||
$defaultPermission->save();
|
||||
}
|
||||
}
|
||||
else if ($request->get('action') == 'update_group_permissions')
|
||||
{
|
||||
/* Update existing group permissions for this album */
|
||||
AlbumDefaultGroupPermission::truncate();
|
||||
|
||||
$permissions = $request->get('permissions');
|
||||
if (is_array($permissions))
|
||||
{
|
||||
foreach ($permissions as $groupID => $permissionIDs)
|
||||
{
|
||||
foreach ($permissionIDs as $permissionID)
|
||||
{
|
||||
$defaultPermission = new AlbumDefaultGroupPermission();
|
||||
$defaultPermission->group_id = $groupID;
|
||||
$defaultPermission->permission_id = $permissionID;
|
||||
$defaultPermission->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rebuild the permissions cache
|
||||
$helper = new PermissionsHelper();
|
||||
$helper->rebuildCache();
|
||||
|
||||
return redirect(route('albums.defaultPermissions'));
|
||||
}
|
||||
|
||||
public function setDefaultUserPermissions(Request $request)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-albums');
|
||||
|
||||
if ($request->get('action') == 'add_user' && $request->has('user_id'))
|
||||
{
|
||||
/* Add a new user to the permission list for this album */
|
||||
|
||||
/** @var User $user */
|
||||
$user = User::where('id', $request->get('user_id'))->first();
|
||||
if (is_null($user))
|
||||
{
|
||||
App::abort(404);
|
||||
}
|
||||
|
||||
// Link all default permissions to the group
|
||||
/** @var Permission $permission */
|
||||
foreach (Permission::where(['section' => 'album', 'is_default' => true])->get() as $permission)
|
||||
{
|
||||
$defaultPermission = new AlbumDefaultUserPermission();
|
||||
$defaultPermission->user_id = $user->id;
|
||||
$defaultPermission->permission_id = $permission->id;
|
||||
$defaultPermission->save();
|
||||
}
|
||||
}
|
||||
else if ($request->get('action') == 'update_user_permissions')
|
||||
{
|
||||
/* Update existing user and anonymous permissions for this album */
|
||||
AlbumDefaultAnonymousPermission::truncate();
|
||||
AlbumDefaultUserPermission::truncate();
|
||||
|
||||
$permissions = $request->get('permissions');
|
||||
if (is_array($permissions))
|
||||
{
|
||||
if (isset($permissions['anonymous']))
|
||||
{
|
||||
foreach ($permissions['anonymous'] as $permissionID)
|
||||
{
|
||||
$defaultPermission = new AlbumDefaultAnonymousPermission();
|
||||
$defaultPermission->permission_id = $permissionID;
|
||||
$defaultPermission->save();
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($permissions as $key => $value)
|
||||
{
|
||||
$userID = intval($key);
|
||||
if ($userID == 0)
|
||||
{
|
||||
// Skip non-numeric IDs (e.g. anonymous)
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($value as $permissionID)
|
||||
{
|
||||
$defaultPermission = new AlbumDefaultUserPermission();
|
||||
$defaultPermission->user_id = $userID;
|
||||
$defaultPermission->permission_id = $permissionID;
|
||||
$defaultPermission->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rebuild the permissions cache
|
||||
$helper = new PermissionsHelper();
|
||||
$helper->rebuildCache();
|
||||
|
||||
return redirect(route('albums.defaultPermissions'));
|
||||
}
|
||||
|
||||
public function setGroupPermissions(Request $request, $id)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-albums');
|
||||
@@ -474,21 +660,41 @@ class AlbumController extends Controller
|
||||
$album->generateUrlPath();
|
||||
$album->save();
|
||||
|
||||
// Link all default permissions to anonymous users (if a public album)
|
||||
if (!$album->is_permissions_inherited)
|
||||
// Link the default permissions (if a public album)
|
||||
$isPrivate = (strtolower($request->get('is_private')) == 'on');
|
||||
if (!$album->is_permissions_inherited && !$isPrivate)
|
||||
{
|
||||
$isPrivate = (strtolower($request->get('is_private')) == 'on');
|
||||
$defaultAlbumUserPermissions = AlbumDefaultUserPermission::all();
|
||||
$defaultAlbumGroupPermissions = AlbumDefaultGroupPermission::all();
|
||||
$defaultAnonPermissions = AlbumDefaultAnonymousPermission::all();
|
||||
|
||||
if (!$isPrivate)
|
||||
/** @var AlbumDefaultAnonymousPermission $permission */
|
||||
foreach ($defaultAnonPermissions as $permission)
|
||||
{
|
||||
/** @var Permission $permission */
|
||||
foreach (Permission::where(['section' => 'album', 'is_default' => true])->get() as $permission)
|
||||
{
|
||||
$album->anonymousPermissions()->attach($permission->id, [
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
]);
|
||||
}
|
||||
$album->anonymousPermissions()->attach($permission->permission_id, [
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
]);
|
||||
}
|
||||
|
||||
/** @var AlbumDefaultGroupPermission $permission */
|
||||
foreach ($defaultAlbumGroupPermissions as $permission)
|
||||
{
|
||||
$album->groupPermissions()->attach($permission->permission_id, [
|
||||
'group_id' => $permission->group_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
]);
|
||||
}
|
||||
|
||||
/** @var AlbumDefaultUserPermission $permission */
|
||||
foreach ($defaultAlbumUserPermissions as $permission)
|
||||
{
|
||||
$album->userPermissions()->attach($permission->permission_id, [
|
||||
'user_id' => $permission->user_id,
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ use App\Http\Requests\SaveSettingsRequest;
|
||||
use App\Label;
|
||||
use App\Mail\TestMailConfig;
|
||||
use App\Photo;
|
||||
use App\PhotoComment;
|
||||
use App\Services\GiteaService;
|
||||
use App\Services\GithubService;
|
||||
use App\Services\PhotoService;
|
||||
@@ -140,6 +141,7 @@ class DefaultController extends Controller
|
||||
$photoCount = Photo::all()->count();
|
||||
$groupCount = Group::all()->count();
|
||||
$labelCount = Label::all()->count();
|
||||
$commentCount = PhotoComment::whereNotNull('approved_at')->count();
|
||||
$userCount = User::where('is_activated', true)->count();
|
||||
|
||||
$minMetadataVersion = Photo::min('metadata_version');
|
||||
@@ -157,6 +159,7 @@ class DefaultController extends Controller
|
||||
return Theme::render('admin.index', [
|
||||
'album_count' => $albumCount,
|
||||
'app_version' => config('app.version'),
|
||||
'comment_count' => $commentCount,
|
||||
'group_count' => $groupCount,
|
||||
'label_count' => $labelCount,
|
||||
'memory_limit' => ini_get('memory_limit'),
|
||||
@@ -231,9 +234,13 @@ class DefaultController extends Controller
|
||||
|
||||
$checkboxKeys = [
|
||||
'albums_menu_parents_only',
|
||||
'allow_photo_comments',
|
||||
'allow_photo_comments_anonymous',
|
||||
'allow_self_registration',
|
||||
'enable_visitor_hits',
|
||||
'hotlink_protection',
|
||||
'moderate_anonymous_users',
|
||||
'moderate_known_users',
|
||||
'recaptcha_enabled_registration',
|
||||
'remove_copyright',
|
||||
'require_email_verification',
|
||||
@@ -252,6 +259,8 @@ class DefaultController extends Controller
|
||||
'facebook_app_secret',
|
||||
'google_app_id',
|
||||
'google_app_secret',
|
||||
'photo_comments_allowed_html',
|
||||
'photo_comments_thread_depth',
|
||||
'sender_address',
|
||||
'sender_name',
|
||||
'smtp_server',
|
||||
|
||||
@@ -34,7 +34,7 @@ class GroupController extends Controller
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel();
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-groups');
|
||||
|
||||
$group = Group::where('id', intval($id))->first();
|
||||
if (is_null($group))
|
||||
|
||||
@@ -0,0 +1,375 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Album;
|
||||
use App\Facade\Theme;
|
||||
use App\Facade\UserConfig;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Mail\PhotoCommentApproved;
|
||||
use App\Mail\PhotoCommentApprovedUser;
|
||||
use App\Mail\PhotoCommentRepliedTo;
|
||||
use App\Photo;
|
||||
use App\PhotoComment;
|
||||
use App\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\View;
|
||||
|
||||
class PhotoCommentController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
View::share('is_admin', true);
|
||||
}
|
||||
|
||||
public function applyBulkAction(Request $request)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-comments');
|
||||
|
||||
$commentIDs = $request->get('comment_ids');
|
||||
if (is_null($commentIDs) || !is_array($commentIDs) || count($commentIDs) == 0)
|
||||
{
|
||||
$request->session()->flash('warning', trans('admin.no_comments_selected_message'));
|
||||
return redirect(route('comments.index'));
|
||||
}
|
||||
|
||||
$comments = PhotoComment::whereIn('id', $commentIDs)->get();
|
||||
$commentsActioned = 0;
|
||||
|
||||
if ($request->has('bulk_delete'))
|
||||
{
|
||||
/** @var PhotoComment $comment */
|
||||
foreach ($comments as $comment)
|
||||
{
|
||||
$comment->delete();
|
||||
$commentsActioned++;
|
||||
}
|
||||
|
||||
$request->session()->flash('success', trans_choice('admin.bulk_comments_deleted', $commentsActioned, ['number' => $commentsActioned]));
|
||||
}
|
||||
else if ($request->has('bulk_approve'))
|
||||
{
|
||||
/** @var PhotoComment $comment */
|
||||
foreach ($comments as $comment)
|
||||
{
|
||||
if ($comment->isApproved())
|
||||
{
|
||||
// Don't make changes if already approved
|
||||
continue;
|
||||
}
|
||||
|
||||
// Mark as approved
|
||||
$comment->approved_at = new \DateTime();
|
||||
$comment->approved_user_id = $this->getUser()->id;
|
||||
|
||||
// The comment may have already been rejected - remove the data if so
|
||||
$comment->rejected_at = null;
|
||||
$comment->rejected_user_id = null;
|
||||
|
||||
// Send the notification e-mail to the owner
|
||||
|
||||
$comment->save();
|
||||
$commentsActioned++;
|
||||
|
||||
// Send e-mail notification
|
||||
$photo = $comment->photo;
|
||||
$album = $photo->album;
|
||||
$this->notifyAlbumOwnerAndPoster($album, $photo, $comment);
|
||||
}
|
||||
|
||||
$request->session()->flash('success', trans_choice('admin.bulk_comments_approved', $commentsActioned, ['number' => $commentsActioned]));
|
||||
}
|
||||
else if ($request->has('bulk_reject'))
|
||||
{
|
||||
/** @var PhotoComment $comment */
|
||||
foreach ($comments as $comment)
|
||||
{
|
||||
if ($comment->isRejected())
|
||||
{
|
||||
// Don't make changes if already rejected
|
||||
continue;
|
||||
}
|
||||
|
||||
// Mark as rejected
|
||||
$comment->rejected_at = new \DateTime();
|
||||
$comment->rejected_user_id = $this->getUser()->id;
|
||||
|
||||
// The comment may have already been approved - remove the data if so
|
||||
$comment->approved_at = null;
|
||||
$comment->approved_user_id = null;
|
||||
|
||||
$comment->save();
|
||||
$commentsActioned++;
|
||||
}
|
||||
|
||||
$request->session()->flash('success', trans_choice('admin.bulk_comments_approved', $commentsActioned, ['number' => $commentsActioned]));
|
||||
}
|
||||
|
||||
return redirect(route('comments.index'));
|
||||
}
|
||||
|
||||
public function approve($id)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-comments');
|
||||
|
||||
$comment = $this->loadCommentByID($id);
|
||||
|
||||
return Theme::render('admin.approve_comment', ['comment' => $comment]);
|
||||
}
|
||||
|
||||
public function bulkAction(Request $request)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-comments');
|
||||
|
||||
$commentIDs = $request->get('comment_ids');
|
||||
if (is_null($commentIDs) || !is_array($commentIDs) || count($commentIDs) == 0)
|
||||
{
|
||||
$request->session()->flash('warning', trans('admin.no_comments_selected_message'));
|
||||
return redirect(route('comments.index'));
|
||||
}
|
||||
|
||||
if ($request->has('bulk_delete'))
|
||||
{
|
||||
if (count($commentIDs) == 1)
|
||||
{
|
||||
// Single comment selected - redirect to the single delete page
|
||||
return redirect(route('comments.delete', ['id' => $commentIDs[0]]));
|
||||
}
|
||||
|
||||
// Show the view to confirm the delete
|
||||
return Theme::render('admin.bulk_delete_comments', [
|
||||
'comment_count' => count($commentIDs),
|
||||
'comment_ids' => $commentIDs
|
||||
]);
|
||||
}
|
||||
else if ($request->has('bulk_approve'))
|
||||
{
|
||||
if (count($commentIDs) == 1)
|
||||
{
|
||||
// Single comment selected - redirect to the single approve page
|
||||
return redirect(route('comments.approve', ['id' => $commentIDs[0]]));
|
||||
}
|
||||
|
||||
// Show the view to confirm the approval
|
||||
return Theme::render('admin.bulk_approve_comments', [
|
||||
'comment_count' => count($commentIDs),
|
||||
'comment_ids' => $commentIDs
|
||||
]);
|
||||
}
|
||||
else if ($request->has('bulk_reject'))
|
||||
{
|
||||
if (count($commentIDs) == 1)
|
||||
{
|
||||
// Single comment selected - redirect to the single reject page
|
||||
return redirect(route('comments.reject', ['id' => $commentIDs[0]]));
|
||||
}
|
||||
|
||||
// Show the view to confirm the rejection
|
||||
return Theme::render('admin.bulk_reject_comments', [
|
||||
'comment_count' => count($commentIDs),
|
||||
'comment_ids' => $commentIDs
|
||||
]);
|
||||
}
|
||||
|
||||
// Unrecognised action - simply redirect back to the index page
|
||||
return redirect(route('comments.index'));
|
||||
}
|
||||
|
||||
public function confirmApprove(Request $request, $id)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-comments');
|
||||
|
||||
$comment = $this->loadCommentByID($id);
|
||||
|
||||
if ($comment->isApproved())
|
||||
{
|
||||
// Comment has already been approved
|
||||
return redirect(route('comments.index'));
|
||||
}
|
||||
|
||||
// Mark as approved
|
||||
$comment->approved_at = new \DateTime();
|
||||
$comment->approved_user_id = $this->getUser()->id;
|
||||
|
||||
// The comment may have already been rejected - remove the data if so
|
||||
$comment->rejected_at = null;
|
||||
$comment->rejected_user_id = null;
|
||||
|
||||
$comment->save();
|
||||
|
||||
$request->session()->flash('success', trans('admin.comment_approval_successful', [
|
||||
'author_name' => $comment->authorDisplayName()
|
||||
]));
|
||||
|
||||
// Send e-mail notification
|
||||
$photo = $comment->photo;
|
||||
$album = $photo->album;
|
||||
$this->notifyAlbumOwnerAndPoster($album, $photo, $comment);
|
||||
|
||||
return redirect(route('comments.index'));
|
||||
}
|
||||
|
||||
public function confirmReject(Request $request, $id)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-comments');
|
||||
|
||||
$comment = $this->loadCommentByID($id);
|
||||
|
||||
if ($comment->isRejected())
|
||||
{
|
||||
// Comment has already been rejected
|
||||
return redirect(route('comments.index'));
|
||||
}
|
||||
|
||||
// Mark as rejected
|
||||
$comment->rejected_at = new \DateTime();
|
||||
$comment->rejected_user_id = $this->getUser()->id;
|
||||
|
||||
// The comment may have already been approved - remove the data if so
|
||||
$comment->approved_at = null;
|
||||
$comment->approved_user_id = null;
|
||||
|
||||
$comment->save();
|
||||
|
||||
$request->session()->flash('success', trans('admin.comment_rejection_successful', [
|
||||
'author_name' => $comment->authorDisplayName()
|
||||
]));
|
||||
|
||||
return redirect(route('comments.index'));
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-comments');
|
||||
|
||||
$comment = $this->loadCommentByID($id);
|
||||
|
||||
return Theme::render('admin.delete_comment', ['comment' => $comment]);
|
||||
}
|
||||
|
||||
public function destroy(Request $request, $id)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-comments');
|
||||
|
||||
/** @var PhotoComment $comment */
|
||||
$comment = $this->loadCommentByID($id);
|
||||
|
||||
$comment->delete();
|
||||
$request->session()->flash('success', trans('admin.comment_deletion_successful', [
|
||||
'author_name' => $comment->authorDisplayName()
|
||||
]));
|
||||
|
||||
return redirect(route('comments.index'));
|
||||
}
|
||||
|
||||
public function index(Request $request)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-comments');
|
||||
|
||||
$validStatusList = [
|
||||
'all',
|
||||
'pending',
|
||||
'approved',
|
||||
'rejected'
|
||||
];
|
||||
|
||||
$filterStatus = $request->get('status', 'all');
|
||||
if (!in_array($filterStatus, $validStatusList))
|
||||
{
|
||||
$filterStatus = $validStatusList[0];
|
||||
}
|
||||
|
||||
$comments = PhotoComment::with('photo')
|
||||
->with('photo.album')
|
||||
->orderBy('created_at', 'desc');
|
||||
|
||||
switch (strtolower($filterStatus))
|
||||
{
|
||||
case 'approved':
|
||||
$comments->whereNotNull('approved_at')
|
||||
->whereNull('rejected_at');
|
||||
break;
|
||||
|
||||
case 'pending':
|
||||
$comments->whereNull('approved_at')
|
||||
->whereNull('rejected_at');
|
||||
break;
|
||||
|
||||
case 'rejected':
|
||||
$comments->whereNull('approved_at')
|
||||
->whereNotNull('rejected_at');
|
||||
break;
|
||||
}
|
||||
|
||||
return Theme::render('admin.list_comments', [
|
||||
'comments' => $comments->paginate(UserConfig::get('items_per_page')),
|
||||
'filter_status' => $filterStatus,
|
||||
'success' => $request->session()->get('success'),
|
||||
'warning' => $request->session()->get('warning')
|
||||
]);
|
||||
}
|
||||
|
||||
public function reject($id)
|
||||
{
|
||||
$this->authorizeAccessToAdminPanel('admin:manage-comments');
|
||||
|
||||
$comment = $this->loadCommentByID($id);
|
||||
|
||||
return Theme::render('admin.reject_comment', ['comment' => $comment]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a given comment by its ID.
|
||||
* @param $id
|
||||
* @return PhotoComment
|
||||
*/
|
||||
private function loadCommentByID($id)
|
||||
{
|
||||
$comment = PhotoComment::where('id', intval($id))->first();
|
||||
if (is_null($comment))
|
||||
{
|
||||
App::abort(404);
|
||||
}
|
||||
|
||||
return $comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an e-mail notification to an album's owned that a comment has been posted/approved.
|
||||
* @param Album $album
|
||||
* @param Photo $photo
|
||||
* @param PhotoComment $comment
|
||||
*/
|
||||
private function notifyAlbumOwnerAndPoster(Album $album, Photo $photo, PhotoComment $comment)
|
||||
{
|
||||
$owner = $album->user;
|
||||
|
||||
Mail::to($owner)->send(new PhotoCommentApproved($owner, $album, $photo, $comment));
|
||||
|
||||
// Also send a notification to the comment poster
|
||||
$poster = new User();
|
||||
$poster->name = $comment->authorDisplayName();
|
||||
$poster->email = $comment->authorEmail();
|
||||
|
||||
Mail::to($poster)->send(new PhotoCommentApprovedUser($poster, $album, $photo, $comment));
|
||||
|
||||
// Send notification to the parent comment owner (if this is a reply)
|
||||
if (!is_null($comment->parent_comment_id))
|
||||
{
|
||||
$parentComment = $this->loadCommentByID($comment->parent_comment_id);
|
||||
|
||||
if (is_null($parentComment))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$parentPoster = new User();
|
||||
$parentPoster->name = $parentComment->authorDisplayName();
|
||||
$parentPoster->email = $parentComment->authorEmail();
|
||||
|
||||
Mail::to($parentPoster)->send(new PhotoCommentRepliedTo($parentPoster, $album, $photo, $comment));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ use App\Facade\Theme;
|
||||
use App\Facade\UserConfig;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
use Illuminate\Contracts\Routing\UrlGenerator;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Http\Request;
|
||||
use Laravel\Socialite\One\TwitterProvider;
|
||||
@@ -29,6 +30,8 @@ class LoginController extends Controller
|
||||
|
||||
use AuthenticatesUsers;
|
||||
|
||||
protected $generator;
|
||||
|
||||
/**
|
||||
* Where to redirect users after login / registration.
|
||||
*
|
||||
@@ -41,9 +44,19 @@ class LoginController extends Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct(UrlGenerator $generator)
|
||||
{
|
||||
$this->middleware('guest', ['except' => 'logout']);
|
||||
$this->generator = $generator;
|
||||
}
|
||||
|
||||
public function logout(Request $request)
|
||||
{
|
||||
$this->guard()->logout();
|
||||
|
||||
$request->session()->invalidate();
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
protected function attemptLogin(Request $request)
|
||||
@@ -88,6 +101,8 @@ class LoginController extends Controller
|
||||
*/
|
||||
public function showLoginForm(Request $request)
|
||||
{
|
||||
$request->getSession()->put('url.intended', $this->generator->previous(false));
|
||||
|
||||
return Theme::render('auth.v2_unified', [
|
||||
'active_tab' => 'login',
|
||||
'info' => $request->session()->get('info'),
|
||||
|
||||
@@ -0,0 +1,371 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Gallery;
|
||||
|
||||
use App\Album;
|
||||
use App\Facade\Theme;
|
||||
use App\Facade\UserConfig;
|
||||
use App\Helpers\DbHelper;
|
||||
use App\Helpers\PermissionsHelper;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\StorePhotoCommentRequest;
|
||||
use App\Mail\ModeratePhotoComment;
|
||||
use App\Mail\PhotoCommentApproved;
|
||||
use App\Mail\PhotoCommentApprovedUser;
|
||||
use App\Permission;
|
||||
use App\Photo;
|
||||
use App\PhotoComment;
|
||||
use App\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class PhotoCommentController extends Controller
|
||||
{
|
||||
public function moderate(Request $request, $albumUrlAlias, $photoFilename, $commentID)
|
||||
{
|
||||
$album = null;
|
||||
|
||||
/** @var Photo $photo */
|
||||
$photo = null;
|
||||
|
||||
/** @var PhotoComment $comment */
|
||||
$comment = null;
|
||||
|
||||
if (!$this->loadAlbumPhotoComment($albumUrlAlias, $photoFilename, $commentID, $album, $photo, $comment))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!User::currentOrAnonymous()->can('moderate-comments', $photo))
|
||||
{
|
||||
App::abort(403);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!$comment->isModerated())
|
||||
{
|
||||
if ($request->has('approve'))
|
||||
{
|
||||
$comment->approved_at = new \DateTime();
|
||||
$comment->approved_user_id = $this->getUser()->id;
|
||||
$comment->save();
|
||||
|
||||
$this->notifyAlbumOwnerAndPoster($album, $photo, $comment);
|
||||
$request->getSession()->flash('success', trans('gallery.photo_comment_approved_successfully'));
|
||||
}
|
||||
else if ($request->has('reject'))
|
||||
{
|
||||
$comment->rejected_at = new \DateTime();
|
||||
$comment->rejected_user_id = $this->getUser()->id;
|
||||
$comment->save();
|
||||
|
||||
$request->getSession()->flash('success', trans('gallery.photo_comment_rejected_successfully'));
|
||||
}
|
||||
}
|
||||
|
||||
return redirect($photo->url());
|
||||
}
|
||||
|
||||
public function reply(Request $request, $albumUrlAlias, $photoFilename, $commentID)
|
||||
{
|
||||
$album = null;
|
||||
|
||||
/** @var Photo $photo */
|
||||
$photo = null;
|
||||
|
||||
/** @var PhotoComment $comment */
|
||||
$comment = null;
|
||||
|
||||
if (!$this->loadAlbumPhotoComment($albumUrlAlias, $photoFilename, $commentID, $album, $photo, $comment))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!User::currentOrAnonymous()->can('post-comment', $photo))
|
||||
{
|
||||
App::abort(403);
|
||||
return null;
|
||||
}
|
||||
|
||||
return Theme::render('partials.photo_comments_reply_form', [
|
||||
'photo' => $photo,
|
||||
'reply_comment' => $comment
|
||||
]);
|
||||
}
|
||||
|
||||
public function store(Request $request, $albumUrlAlias, $photoFilename)
|
||||
{
|
||||
$album = null;
|
||||
|
||||
/** @var Photo $photo */
|
||||
$photo = null;
|
||||
|
||||
/** @var PhotoComment $comment */
|
||||
$comment = null;
|
||||
|
||||
if (!$this->loadAlbumPhotoComment($albumUrlAlias, $photoFilename, 0, $album, $photo, $comment))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!User::currentOrAnonymous()->can('post-comment', $photo))
|
||||
{
|
||||
App::abort(403);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Validate and link the parent comment, if provided
|
||||
// We do this here so if the validation fails, we still have the parent comment available in the catch block
|
||||
$parentComment = null;
|
||||
if ($request->has('parent_comment_id'))
|
||||
{
|
||||
$parentComment = $photo->comments()->where('id', intval($request->get('parent_comment_id')))->first();
|
||||
|
||||
if (is_null($parentComment))
|
||||
{
|
||||
return redirect($photo->url());
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$this->validate($request, [
|
||||
'name' => 'required|max:255',
|
||||
'email' => 'sometimes|max:255|email',
|
||||
'comment' => 'required'
|
||||
]);
|
||||
|
||||
$commentText = $this->stripDisallowedHtmlTags($request->get('comment'));
|
||||
|
||||
$comment = new PhotoComment();
|
||||
$comment->photo_id = $photo->id;
|
||||
$comment->fill($request->only(['name', 'email']));
|
||||
$comment->comment = $commentText;
|
||||
|
||||
if (!is_null($parentComment))
|
||||
{
|
||||
$comment->parent_comment_id = $parentComment->id;
|
||||
}
|
||||
|
||||
// Set the created user ID if we're logged in
|
||||
$user = $this->getUser();
|
||||
if (!is_null($user) && !$user->isAnonymous())
|
||||
{
|
||||
$comment->created_user_id = $user->id;
|
||||
}
|
||||
|
||||
// Auto-approve the comment if we're allowed to moderate comments
|
||||
$isAutoApproved = false;
|
||||
if (User::currentOrAnonymous()->can('moderate-comments', $photo))
|
||||
{
|
||||
$comment->approved_at = new \DateTime();
|
||||
$comment->approved_user_id = $user->id;
|
||||
$isAutoApproved = true;
|
||||
}
|
||||
|
||||
// Auto-approve the comment if settings allow
|
||||
if ($user->isAnonymous() && !UserConfig::get('moderate_anonymous_users'))
|
||||
{
|
||||
$comment->approved_at = new \DateTime();
|
||||
$comment->approved_user_id = null; // we don't have a user ID to set!
|
||||
$isAutoApproved = true;
|
||||
}
|
||||
else if (!$user->isAnonymous() && !UserConfig::get('moderate_known_users'))
|
||||
{
|
||||
$comment->approved_at = new \DateTime();
|
||||
$comment->approved_user_id = $user->id;
|
||||
$isAutoApproved = true;
|
||||
}
|
||||
|
||||
$comment->save();
|
||||
|
||||
// Send notification e-mails to moderators or album owner
|
||||
if (!$isAutoApproved)
|
||||
{
|
||||
$this->notifyAlbumModerators($album, $photo, $comment);
|
||||
$request->getSession()->flash('success', trans('gallery.photo_comment_posted_successfully_pending_moderation'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->notifyAlbumOwnerAndPoster($album, $photo, $comment);
|
||||
$request->getSession()->flash('success', trans('gallery.photo_comment_posted_successfully'));
|
||||
}
|
||||
|
||||
if ($request->isXmlHttpRequest())
|
||||
{
|
||||
return response()->json(['redirect_url' => $photo->url()]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return redirect($photo->url());
|
||||
}
|
||||
}
|
||||
catch (ValidationException $e)
|
||||
{
|
||||
if (!is_null($parentComment))
|
||||
{
|
||||
return redirect()
|
||||
->to($photo->replyToCommentFormUrl($parentComment->id))
|
||||
->withErrors($e->errors())
|
||||
->withInput($request->all());
|
||||
}
|
||||
else
|
||||
{
|
||||
return redirect()
|
||||
->back()
|
||||
->withErrors($e->errors())
|
||||
->withInput($request->all());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function loadAlbumPhotoComment($albumUrlAlias, $photoFilename, $commentID, &$album, &$photo, &$comment)
|
||||
{
|
||||
$album = DbHelper::getAlbumByPath($albumUrlAlias);
|
||||
if (is_null($album))
|
||||
{
|
||||
App::abort(404);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->authorizeForUser($this->getUser(), 'view', $album);
|
||||
|
||||
$photo = PhotoController::loadPhotoByAlbumAndFilename($album, $photoFilename);
|
||||
|
||||
if (!UserConfig::get('allow_photo_comments'))
|
||||
{
|
||||
// Not allowed to post comments
|
||||
App::abort(404);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (intval($commentID > 0))
|
||||
{
|
||||
$comment = $photo->comments()->where('id', $commentID)->first();
|
||||
if (is_null($comment))
|
||||
{
|
||||
App::abort(404);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an e-mail notification to an album's moderators that a comment is available to moderate.
|
||||
* @param Album $album
|
||||
* @param Photo $photo
|
||||
* @param PhotoComment $comment
|
||||
*/
|
||||
private function notifyAlbumModerators(Album $album, Photo $photo, PhotoComment $comment)
|
||||
{
|
||||
// Get all users from the cache
|
||||
$helper = new PermissionsHelper();
|
||||
$moderators = $helper->usersWhoCan_Album($album, 'moderate-comments');
|
||||
|
||||
/** @var User $moderator */
|
||||
foreach ($moderators as $moderator)
|
||||
{
|
||||
Mail::to($moderator)->send(new ModeratePhotoComment($moderator, $album, $photo, $comment));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an e-mail notification to an album's owned that a comment has been posted/approved.
|
||||
* @param Album $album
|
||||
* @param Photo $photo
|
||||
* @param PhotoComment $comment
|
||||
*/
|
||||
private function notifyAlbumOwnerAndPoster(Album $album, Photo $photo, PhotoComment $comment)
|
||||
{
|
||||
$owner = $album->user;
|
||||
|
||||
Mail::to($owner)->send(new PhotoCommentApproved($owner, $album, $photo, $comment));
|
||||
|
||||
// Also send a notification to the comment poster
|
||||
$poster = new User();
|
||||
$poster->name = $comment->authorDisplayName();
|
||||
$poster->email = $comment->authorEmail();
|
||||
|
||||
Mail::to($poster)->send(new PhotoCommentApprovedUser($poster, $album, $photo, $comment));
|
||||
|
||||
// Send notification to the parent comment owner (if this is a reply)
|
||||
if (!is_null($comment->parent_comment_id))
|
||||
{
|
||||
$parentComment = $this->loadCommentByID($comment->parent_comment_id);
|
||||
|
||||
if (is_null($parentComment))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$parentPoster = new User();
|
||||
$parentPoster->name = $parentComment->authorDisplayName();
|
||||
$parentPoster->email = $parentComment->authorEmail();
|
||||
|
||||
Mail::to($parentPoster)->send(new PhotoCommentRepliedTo($parentPoster, $album, $photo, $comment));
|
||||
}
|
||||
}
|
||||
|
||||
private function stripDisallowedHtmlTags($commentText)
|
||||
{
|
||||
$allowedHtmlTags = explode(',', UserConfig::get('photo_comments_allowed_html'));
|
||||
$allowedHtmlTagsCleaned = [];
|
||||
|
||||
foreach ($allowedHtmlTags as $tag)
|
||||
{
|
||||
$allowedHtmlTagsCleaned[] = trim($tag);
|
||||
}
|
||||
|
||||
// Match any starting HTML tags
|
||||
$regexMatchString = '/<(?!\/)([a-z]+)(?:\s.*)*>/Us';
|
||||
|
||||
$htmlTagMatches = [];
|
||||
preg_match_all($regexMatchString, $commentText, $htmlTagMatches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
|
||||
|
||||
for ($index = 0; $index < count($htmlTagMatches); $index++)
|
||||
{
|
||||
$htmlTagMatch = $htmlTagMatches[$index];
|
||||
|
||||
$htmlTag = $htmlTagMatch[1][0]; // e.g. "p" for <p>
|
||||
if (in_array($htmlTag, $allowedHtmlTagsCleaned))
|
||||
{
|
||||
// This tag is allowed - carry on
|
||||
continue;
|
||||
}
|
||||
|
||||
/* This tag is not allowed - remove it from the string */
|
||||
|
||||
// Find the closing tag
|
||||
$disallowedStringOffset = $htmlTagMatch[0][1];
|
||||
$endingTagMatches = [];
|
||||
preg_match(sprintf('/(<%1$s.*>)(.+)<\/%1$s>/Us', $htmlTag), $commentText, $endingTagMatches, 0, $disallowedStringOffset);
|
||||
|
||||
// Replace the matched string with the inner string
|
||||
$commentText = substr_replace($commentText, $endingTagMatches[2], $disallowedStringOffset, strlen($endingTagMatches[0]));
|
||||
|
||||
// Adjust the offsets for strings after the one we're processing, so the offsets match up with the string correctly
|
||||
for ($index2 = $index + 1; $index2 < count($htmlTagMatches); $index2++)
|
||||
{
|
||||
// If this string appears entirely BEFORE the next one starts, we need to subtract the entire length.
|
||||
// Otherwise, we only need to substract the length of the start tag, as the next one starts within it.
|
||||
$differenceAfterReplacement = strlen($endingTagMatches[1]);
|
||||
|
||||
if ($htmlTagMatch[0][1] + strlen($endingTagMatches[0]) < $htmlTagMatches[$index2][0][1])
|
||||
{
|
||||
$differenceAfterReplacement = strlen($endingTagMatches[0]) - strlen($endingTagMatches[2]);
|
||||
}
|
||||
|
||||
$htmlTagMatches[$index2][0][1] -= $differenceAfterReplacement;
|
||||
$htmlTagMatches[$index2][1][1] -= $differenceAfterReplacement;
|
||||
}
|
||||
}
|
||||
|
||||
return $commentText;
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,8 @@ class PhotoController extends Controller
|
||||
'is_original_allowed' => $isOriginalAllowed,
|
||||
'next_photo' => $nextPhoto,
|
||||
'photo' => $photo,
|
||||
'previous_photo' => $previousPhoto
|
||||
'previous_photo' => $previousPhoto,
|
||||
'success' => $request->getSession()->get('success')
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Album;
|
||||
use App\Facade\Theme;
|
||||
use App\Photo;
|
||||
use App\PhotoComment;
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ModeratePhotoComment extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
private $album;
|
||||
private $comment;
|
||||
private $photo;
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User $user, Album $album, Photo $photo, PhotoComment $comment)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->album = $album;
|
||||
$this->photo = $photo;
|
||||
$this->comment = $comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$subject = trans('email.moderate_photo_comment_subject', ['album_name' => $this->album->name]);
|
||||
|
||||
return $this
|
||||
->subject($subject)
|
||||
->markdown(Theme::viewName('email.moderate_photo_comment'))
|
||||
->with([
|
||||
'album' => $this->album,
|
||||
'comment' => $this->comment,
|
||||
'photo' => $this->photo,
|
||||
'subject' => $subject,
|
||||
'user' => $this->user
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Album;
|
||||
use App\Facade\Theme;
|
||||
use App\Photo;
|
||||
use App\PhotoComment;
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* E-mail notification to the owner of an album that is sent when a new comment has been approved in their album.
|
||||
* @package App\Mail
|
||||
*/
|
||||
class PhotoCommentApproved extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
private $album;
|
||||
private $comment;
|
||||
private $photo;
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User $user, Album $album, Photo $photo, PhotoComment $comment)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->album = $album;
|
||||
$this->photo = $photo;
|
||||
$this->comment = $comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$subject = trans('email.photo_comment_approved_subject', ['album_name' => $this->album->name]);
|
||||
|
||||
return $this
|
||||
->subject($subject)
|
||||
->markdown(Theme::viewName('email.photo_comment_approved'))
|
||||
->with([
|
||||
'album' => $this->album,
|
||||
'comment' => $this->comment,
|
||||
'photo' => $this->photo,
|
||||
'subject' => $subject,
|
||||
'user' => $this->user
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Album;
|
||||
use App\Facade\Theme;
|
||||
use App\Photo;
|
||||
use App\PhotoComment;
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* E-mail notification to the poster of a comment that is sent when it has been approved.
|
||||
* @package App\Mail
|
||||
*/
|
||||
class PhotoCommentApprovedUser extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
private $album;
|
||||
private $comment;
|
||||
private $photo;
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User $user, Album $album, Photo $photo, PhotoComment $comment)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->album = $album;
|
||||
$this->photo = $photo;
|
||||
$this->comment = $comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$subject = trans('email.photo_comment_approved_user_subject', ['album_name' => $this->album->name]);
|
||||
|
||||
return $this
|
||||
->subject($subject)
|
||||
->markdown(Theme::viewName('email.photo_comment_approved_user'))
|
||||
->with([
|
||||
'album' => $this->album,
|
||||
'comment' => $this->comment,
|
||||
'photo' => $this->photo,
|
||||
'subject' => $subject,
|
||||
'user' => $this->user
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Album;
|
||||
use App\Facade\Theme;
|
||||
use App\Photo;
|
||||
use App\PhotoComment;
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* E-mail notification to the poster of a comment that is sent when it has been approved.
|
||||
* @package App\Mail
|
||||
*/
|
||||
class PhotoCommentRepliedTo extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
private $album;
|
||||
private $comment;
|
||||
private $photo;
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User $user, Album $album, Photo $photo, PhotoComment $comment)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->album = $album;
|
||||
$this->photo = $photo;
|
||||
$this->comment = $comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$subject = trans('email.photo_comment_replied_to_subject', ['album_name' => $this->album->name]);
|
||||
|
||||
return $this
|
||||
->subject($subject)
|
||||
->markdown(Theme::viewName('email.photo_comment_replied_to'))
|
||||
->with([
|
||||
'album' => $this->album,
|
||||
'comment' => $this->comment,
|
||||
'photo' => $this->photo,
|
||||
'subject' => $subject,
|
||||
'user' => $this->user
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,11 @@ class Photo extends Model
|
||||
return $this->belongsTo(Album::class);
|
||||
}
|
||||
|
||||
public function comments()
|
||||
{
|
||||
return $this->hasMany(PhotoComment::class);
|
||||
}
|
||||
|
||||
public function exifUrl()
|
||||
{
|
||||
return route('viewExifData', [
|
||||
@@ -77,6 +82,32 @@ class Photo extends Model
|
||||
return $this->belongsToMany(Label::class, 'photo_labels');
|
||||
}
|
||||
|
||||
public function moderateCommentUrl($commentID = -1)
|
||||
{
|
||||
return route('moderatePhotoComment', [
|
||||
'albumUrlAlias' => $this->album->url_path,
|
||||
'photoFilename' => $this->storage_file_name,
|
||||
'commentID' => $commentID
|
||||
]);
|
||||
}
|
||||
|
||||
public function postCommentUrl()
|
||||
{
|
||||
return route('postPhotoComment', [
|
||||
'albumUrlAlias' => $this->album->url_path,
|
||||
'photoFilename' => $this->storage_file_name
|
||||
]);
|
||||
}
|
||||
|
||||
public function replyToCommentFormUrl($commentID = -1)
|
||||
{
|
||||
return route('replyPhotoComment', [
|
||||
'albumUrlAlias' => $this->album->url_path,
|
||||
'photoFilename' => $this->storage_file_name,
|
||||
'commentID' => $commentID
|
||||
]);
|
||||
}
|
||||
|
||||
public function thumbnailUrl($thumbnailName = null, $cacheBust = true)
|
||||
{
|
||||
$url = $this->album->getAlbumSource()->getUrlToPhoto($this, $thumbnailName);
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PhotoComment extends Model
|
||||
{
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'comment'
|
||||
];
|
||||
|
||||
public function authorDisplayName()
|
||||
{
|
||||
return is_null($this->createdBy) ? $this->name : $this->createdBy->name;
|
||||
}
|
||||
|
||||
public function authorEmail()
|
||||
{
|
||||
return is_null($this->createdBy) ? $this->email : $this->createdBy->email;
|
||||
}
|
||||
|
||||
public function children()
|
||||
{
|
||||
return $this->hasMany(PhotoComment::class, 'parent_comment_id');
|
||||
}
|
||||
|
||||
public function createdBy()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_user_id');
|
||||
}
|
||||
|
||||
public function depth()
|
||||
{
|
||||
$depth = 0;
|
||||
$current = $this;
|
||||
|
||||
while (!is_null($current->parent))
|
||||
{
|
||||
$current = $current->parent;
|
||||
$depth++;
|
||||
}
|
||||
|
||||
return $depth;
|
||||
}
|
||||
|
||||
public function isApproved()
|
||||
{
|
||||
return (!is_null($this->approved_at) && is_null($this->rejected_at));
|
||||
}
|
||||
|
||||
public function isModerated()
|
||||
{
|
||||
return (!is_null($this->approved_at) || !is_null($this->rejected_at));
|
||||
}
|
||||
|
||||
public function isRejected()
|
||||
{
|
||||
return (!is_null($this->rejected_at) && is_null($this->approved_at));
|
||||
}
|
||||
|
||||
public function parent()
|
||||
{
|
||||
return $this->belongsTo(PhotoComment::class, 'parent_comment_id');
|
||||
}
|
||||
|
||||
public function photo()
|
||||
{
|
||||
return $this->belongsTo(Photo::class);
|
||||
}
|
||||
|
||||
public function textAsHtml()
|
||||
{
|
||||
$start = '<p>';
|
||||
$end = '</p>';
|
||||
$isHtml = (
|
||||
strlen($this->comment) > (strlen($start) + strlen($end)) && // text contains both our start + end string
|
||||
strtolower(substr($this->comment, 0, strlen($start))) == strtolower($start) && // text starts with our start string
|
||||
strtolower(substr($this->comment, strlen($this->comment) - strlen($end))) == strtolower($end) // text ends with our end string
|
||||
);
|
||||
|
||||
return $isHtml ? $this->comment : sprintf('<p>%s</p>', $this->comment);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Album;
|
||||
use App\Facade\UserConfig;
|
||||
use App\Group;
|
||||
use App\Helpers\PermissionsHelper;
|
||||
use App\Permission;
|
||||
@@ -93,6 +94,34 @@ class AlbumPolicy
|
||||
return $this->userHasPermission($user, $album, 'manipulate-photos');
|
||||
}
|
||||
|
||||
public function moderateComments(User $user, Album $album)
|
||||
{
|
||||
if ($user->id == $album->user_id)
|
||||
{
|
||||
// The album's owner and can do everything
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->userHasPermission($user, $album, 'moderate-comments');
|
||||
}
|
||||
|
||||
public function postComment(User $user, Album $album)
|
||||
{
|
||||
if ($user->id == $album->user_id)
|
||||
{
|
||||
// The album's owner and can do everything
|
||||
return true;
|
||||
}
|
||||
|
||||
// Don't allow comments to be posted if anonymous user, and anonymous comments disabled
|
||||
if ($user->isAnonymous() && !UserConfig::get('allow_photo_comments_anonymous'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->userHasPermission($user, $album, 'post-comment');
|
||||
}
|
||||
|
||||
public function uploadPhotos(User $user, Album $album)
|
||||
{
|
||||
if ($user->id == $album->user_id)
|
||||
|
||||
@@ -61,4 +61,26 @@ class PhotoPolicy
|
||||
|
||||
return $user->can('manipulate-photos', $photo->album);
|
||||
}
|
||||
|
||||
public function moderateComments(User $user, Photo $photo)
|
||||
{
|
||||
if ($user->id == $photo->user_id)
|
||||
{
|
||||
// The photo's owner can do everything
|
||||
return true;
|
||||
}
|
||||
|
||||
return $user->can('moderate-comments', $photo->album);
|
||||
}
|
||||
|
||||
public function postComment(User $user, Photo $photo)
|
||||
{
|
||||
if ($user->id == $photo->user_id)
|
||||
{
|
||||
// The photo's owner can do everything
|
||||
return true;
|
||||
}
|
||||
|
||||
return $user->can('post-comment', $photo->album);
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,10 @@ class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
return $this->userHasAdminPermission($user, 'manage-albums');
|
||||
});
|
||||
Gate::define('admin:manage-comments', function ($user)
|
||||
{
|
||||
return $this->userHasAdminPermission($user, 'manage-comments');
|
||||
});
|
||||
Gate::define('admin:manage-groups', function ($user)
|
||||
{
|
||||
return $this->userHasAdminPermission($user, 'manage-groups');
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePhotoCommentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('photo_comments', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('photo_id');
|
||||
$table->string('name');
|
||||
$table->string('email');
|
||||
$table->text('comment');
|
||||
$table->unsignedInteger('created_user_id')->nullable(true);
|
||||
$table->unsignedInteger('approved_user_id')->nullable(true);
|
||||
$table->dateTime('approved_at')->nullable(true);
|
||||
$table->unsignedBigInteger('parent_comment_id')->nullable(true);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('photo_id')
|
||||
->references('id')->on('photos')
|
||||
->onDelete('cascade');
|
||||
$table->foreign('created_user_id')
|
||||
->references('id')->on('users')
|
||||
->onDelete('cascade');
|
||||
$table->foreign('approved_user_id')
|
||||
->references('id')->on('users')
|
||||
->onDelete('cascade');
|
||||
$table->foreign('parent_comment_id')
|
||||
->references('id')->on('photo_comments')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('photo_comments');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddCommentRejectedColumns extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('photo_comments', function (Blueprint $table) {
|
||||
$table->unsignedInteger('rejected_user_id')->nullable(true);
|
||||
$table->dateTime('rejected_at')->nullable(true);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('photo_comments', function (Blueprint $table) {
|
||||
$table->dropColumn('rejected_user_id');
|
||||
$table->dropColumn('rejected_at');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateAlbumDefaultGroupPermissionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('album_default_group_permissions', function (Blueprint $table) {
|
||||
$table->unsignedInteger('group_id');
|
||||
$table->unsignedInteger('permission_id');
|
||||
|
||||
$table->foreign('group_id')
|
||||
->references('id')->on('groups')
|
||||
->onDelete('cascade');
|
||||
$table->foreign('permission_id')
|
||||
->references('id')->on('permissions')
|
||||
->onDelete('no action');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('album_default_group_permissions');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateAlbumDefaultUserPermissionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('album_default_user_permissions', function (Blueprint $table) {
|
||||
$table->unsignedInteger('user_id');
|
||||
$table->unsignedInteger('permission_id');
|
||||
|
||||
$table->foreign('user_id')
|
||||
->references('id')->on('users')
|
||||
->onDelete('cascade');
|
||||
$table->foreign('permission_id')
|
||||
->references('id')->on('permissions')
|
||||
->onDelete('no action');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('album_default_user_permissions');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateAlbumDefaultAnonymousPermissionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('album_default_anonymous_permissions', function (Blueprint $table) {
|
||||
$table->unsignedInteger('permission_id');
|
||||
|
||||
$table->foreign('permission_id')
|
||||
->references('id')->on('permissions')
|
||||
->onDelete('no action');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('album_default_anonymous_permissions');
|
||||
}
|
||||
}
|
||||
@@ -72,6 +72,14 @@ class PermissionsSeeder extends Seeder
|
||||
'is_default' => false,
|
||||
'sort_order' => 0
|
||||
]);
|
||||
|
||||
// admin:manage-comments = controls if photo comments can be managed
|
||||
DatabaseSeeder::createOrUpdate('permissions', [
|
||||
'section' => 'admin',
|
||||
'description' => 'manage-comments',
|
||||
'is_default' => false,
|
||||
'sort_order' => 0
|
||||
]);
|
||||
}
|
||||
|
||||
private function seedAlbumPermissions()
|
||||
@@ -139,5 +147,21 @@ class PermissionsSeeder extends Seeder
|
||||
'is_default' => false,
|
||||
'sort_order' => 60
|
||||
]);
|
||||
|
||||
// album:moderate-comments = moderate comments posted on photos
|
||||
DatabaseSeeder::createOrUpdate('permissions', [
|
||||
'section' => 'album',
|
||||
'description' => 'moderate-comments',
|
||||
'is_default' => false,
|
||||
'sort_order' => 70
|
||||
]);
|
||||
|
||||
// album:moderate-comments = moderate comments posted on photos
|
||||
DatabaseSeeder::createOrUpdate('permissions', [
|
||||
'section' => 'album',
|
||||
'description' => 'post-comment',
|
||||
'is_default' => false,
|
||||
'sort_order' => 80
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -100,6 +100,10 @@
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.photo-comment .card-subtitle {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.stats-table .icon-col {
|
||||
font-size: 1.4em;
|
||||
width: 20%;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.admin-sidebar-card{margin-bottom:15px}.album-expand-handle{cursor:pointer;margin-top:5px}.meta-label,.meta-value{vertical-align:middle !important}.photo .loading{background-color:#fff;display:none;height:100%;left:0;opacity:.8;position:absolute;text-align:center;top:0;width:100%;z-index:1000}.photo .loading img{margin-top:40px}.text-red{color:red}[v-cloak]{display:none}.activity-grid{font-size:smaller}.activity-grid th,.activity-grid td{padding:5px !important;text-align:center}.activity-grid td{color:#fff;height:20px}.activity-grid .has-activity{background-color:#1e90ff}.activity-grid .invalid-date{background-color:#e5e5e5}.activity-grid .no-activity{background-color:#fff}.activity-grid th:first-child,.activity-grid td:first-child{border-left:1px solid #dee2e6}.activity-grid th,.activity-grid td{border-right:1px solid #dee2e6}.activity-grid tr:last-child td{border-bottom:1px solid #dee2e6}.activity-grid .border-spacer-element{border-right-width:0;padding:0 !important;width:1px}.album-slideshow-container #image-preview{height:600px;max-width:100%;width:800px}.album-slideshow-container #image-preview img{max-width:100%}.album-slideshow-container .thumbnails{overflow-x:scroll;overflow-y:hidden;white-space:nowrap;width:auto}.stats-table .icon-col{font-size:1.4em;width:20%;vertical-align:middle}.stats-table .stat-col{font-size:1.8em;font-weight:bold;width:40%}.stats-table .text-col{font-size:1.2em;vertical-align:middle;width:40%}html{font-size:14px !important}button,input,optgroup,select,textarea{cursor:pointer;font-family:inherit !important}.album-photo-cards .card{margin-bottom:15px}.container,.container-fluid{margin-top:20px}.hidden{display:none}.tab-content{border:solid 1px #ddd;border-top:0;padding:20px}.tether-element,.tether-element:after,.tether-element:before,.tether-element *,.tether-element *:after,.tether-element *:before{box-sizing:border-box}.tether-element{position:absolute;display:none}.tether-element.tether-open{display:block}.tether-element.tether-theme-basic{max-width:100%;max-height:100%}.tether-element.tether-theme-basic .tether-content{border-radius:5px;box-shadow:0 2px 8px rgba(0,0,0,0.2);font-family:inherit;background:#fff;color:inherit;padding:1em;font-size:1.1em;line-height:1.5em}.tether-element,.tether-element:after,.tether-element:before,.tether-element *,.tether-element *:after,.tether-element *:before{box-sizing:border-box}.tether-element{position:absolute;display:none}.tether-element.tether-open{display:block}.tt-query{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.tt-hint{color:#999}.tt-menu{width:422px;margin-top:4px;padding:4px 0;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.tt-suggestion{padding:3px 20px;line-height:24px}.tt-suggestion.tt-cursor,.tt-suggestion:hover{color:#fff;background-color:#0097cf}.tt-suggestion p{margin:0}/*!
|
||||
.admin-sidebar-card{margin-bottom:15px}.album-expand-handle{cursor:pointer;margin-top:5px}.meta-label,.meta-value{vertical-align:middle !important}.photo .loading{background-color:#fff;display:none;height:100%;left:0;opacity:.8;position:absolute;text-align:center;top:0;width:100%;z-index:1000}.photo .loading img{margin-top:40px}.text-red{color:red}[v-cloak]{display:none}.activity-grid{font-size:smaller}.activity-grid th,.activity-grid td{padding:5px !important;text-align:center}.activity-grid td{color:#fff;height:20px}.activity-grid .has-activity{background-color:#1e90ff}.activity-grid .invalid-date{background-color:#e5e5e5}.activity-grid .no-activity{background-color:#fff}.activity-grid th:first-child,.activity-grid td:first-child{border-left:1px solid #dee2e6}.activity-grid th,.activity-grid td{border-right:1px solid #dee2e6}.activity-grid tr:last-child td{border-bottom:1px solid #dee2e6}.activity-grid .border-spacer-element{border-right-width:0;padding:0 !important;width:1px}.album-slideshow-container #image-preview{height:600px;max-width:100%;width:800px}.album-slideshow-container #image-preview img{max-width:100%}.album-slideshow-container .thumbnails{overflow-x:scroll;overflow-y:hidden;white-space:nowrap;width:auto}.photo-comment .card-subtitle{font-size:smaller}.stats-table .icon-col{font-size:1.4em;width:20%;vertical-align:middle}.stats-table .stat-col{font-size:1.8em;font-weight:bold;width:40%}.stats-table .text-col{font-size:1.2em;vertical-align:middle;width:40%}html{font-size:14px !important}button,input,optgroup,select,textarea{cursor:pointer;font-family:inherit !important}.album-photo-cards .card{margin-bottom:15px}.container,.container-fluid{margin-top:20px}.hidden{display:none}.tab-content{border:solid 1px #ddd;border-top:0;padding:20px}.tether-element,.tether-element:after,.tether-element:before,.tether-element *,.tether-element *:after,.tether-element *:before{box-sizing:border-box}.tether-element{position:absolute;display:none}.tether-element.tether-open{display:block}.tether-element.tether-theme-basic{max-width:100%;max-height:100%}.tether-element.tether-theme-basic .tether-content{border-radius:5px;box-shadow:0 2px 8px rgba(0,0,0,0.2);font-family:inherit;background:#fff;color:inherit;padding:1em;font-size:1.1em;line-height:1.5em}.tether-element,.tether-element:after,.tether-element:before,.tether-element *,.tether-element *:after,.tether-element *:before{box-sizing:border-box}.tether-element{position:absolute;display:none}.tether-element.tether-open{display:block}.tt-query{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.tt-hint{color:#999}.tt-menu{width:422px;margin-top:4px;padding:4px 0;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.tt-suggestion{padding:3px 20px;line-height:24px}.tt-suggestion.tt-cursor,.tt-suggestion:hover{color:#fff;background-color:#0097cf}.tt-suggestion p{margin:0}/*!
|
||||
* Bootstrap v4.1.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
|
||||
@@ -41534,6 +41534,82 @@ module.exports = function(Chart) {
|
||||
|
||||
},{"25":25,"45":45,"6":6}]},{},[7])(7)
|
||||
});
|
||||
/**
|
||||
* This model is used by gallery/photo.blade.php, to handle comments and individual photo actions.
|
||||
* @constructor
|
||||
*/
|
||||
function PhotoViewModel(urls) {
|
||||
this.el = '#photo-app';
|
||||
|
||||
this.data = {
|
||||
is_reply_form_loading: false,
|
||||
reply_comment_id: 0
|
||||
};
|
||||
|
||||
this.computed = {
|
||||
replyFormStyle: function()
|
||||
{
|
||||
return {
|
||||
'display': this.is_reply_form_loading ? 'none' : 'block'
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
this.methods = {
|
||||
init: function() {
|
||||
var self = this;
|
||||
|
||||
// Load the right comment reply form
|
||||
$('#comment-reply-modal').on('show.bs.modal', function (event) {
|
||||
var url = urls.reply_comment_form.replace(/-1$/, self.reply_comment_id);
|
||||
$.get(url, function(result)
|
||||
{
|
||||
$('#comment-reply-form-content').html(result);
|
||||
initTinyMce('#comment-text-reply');
|
||||
self.is_reply_form_loading = false;
|
||||
});
|
||||
});
|
||||
|
||||
$('#comment-reply-modal').on('hide.bs.modal', function (event) {
|
||||
tinymce.remove('#comment-text-reply');
|
||||
});
|
||||
},
|
||||
postCommentReply: function() {
|
||||
var form = $('form', '#comment-reply-form-content');
|
||||
var formUrl = $(form).attr('action');
|
||||
|
||||
// Seems like the TinyMCE editor in the BS modal does not persist back to the textarea correctly - so do
|
||||
// this manually (bit of a hack!)
|
||||
$('#comment-text-reply', form).html(tinymce.get('comment-text-reply').getContent());
|
||||
|
||||
var formData = form.serialize();
|
||||
|
||||
$.post(formUrl, formData, function(result)
|
||||
{
|
||||
if (result.redirect_url)
|
||||
{
|
||||
window.location = result.redirect_url;
|
||||
}
|
||||
else
|
||||
{
|
||||
tinymce.remove('#comment-text-reply');
|
||||
$('#comment-reply-form-content').html(result);
|
||||
initTinyMce('#comment-text-reply');
|
||||
}
|
||||
});
|
||||
},
|
||||
replyToComment: function(e) {
|
||||
var replyButton = $(e.target).closest('.photo-comment');
|
||||
this.reply_comment_id = replyButton.data('comment-id');
|
||||
|
||||
this.is_reply_form_loading = true;
|
||||
$('#comment-reply-modal').modal('show');
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
function StorageLocationViewModel()
|
||||
{
|
||||
this.el = '#storage-options';
|
||||
|
||||
@@ -1 +1 @@
|
||||
function AboutViewModel(t){this.el="#about-app",this.data={can_upgrade:!1,is_loading:!0,version_body:"",version_date:"",version_name:"",version_url:""},this.computed={},this.methods={init:function(){var e=this;$.ajax(t.latest_release_url,{complete:function(){e.is_loading=!1},dataType:"json",error:function(t,e,n){},method:"GET",success:function(t){e.version_body=t.body,e.version_date=t.publish_date,e.version_name=t.name,e.version_url=t.url,e.can_upgrade=t.can_upgrade}})}}}function CreateAlbumViewModel(){this.el="#create-album-app",this.data={is_inherit_permissions:!0,is_private:!1,parent_id:""},this.computed={isParentAlbum:function(){return""==this.parent_id},isPrivateDisabled:function(){return!this.isParentAlbum&&this.is_inherit_permissions}}}function EditAlbumViewModel(){this.el="#edit-album-app",this.data={parent_id:""},this.computed={isParentAlbum:function(){return""==this.parent_id}}}function SettingsViewModel(t,e){this.el="#settings-app",this.data={is_rebuilding_permissions_cache:!1},this.methods={rebuildPermissionsCache:function(n){var i=this;return $.ajax(t.rebuild_permissions_cache,{complete:function(){i.is_rebuilding_permissions_cache=!1},dataType:"json",error:function(t,n,i){alert(e.permissions_cache_rebuild_failed)},method:"POST",success:function(t){alert(e.permissions_cache_rebuild_succeeded)}}),n.preventDefault(),!1}}}function AnalyseAlbumViewModel(){this.el="#analyse-album",this.data={imagesFailed:[],imagesToAnalyse:[],imagesInProgress:[],imagesRecentlyCompleted:[],numberSuccessful:0,numberFailed:0},this.computed={failedPercentage:function(){var t=0;return this.numberTotal>0&&(t=this.numberFailed/this.numberTotal*100),t.toFixed(2)+"%"},isCompleted:function(){return this.numberTotal>0&&this.numberSuccessful+this.numberFailed>=this.numberTotal},latestCompletedImages:function(){var t=this.imagesRecentlyCompleted.length-3<0?0:this.imagesRecentlyCompleted.length-3,e=t+3;return this.imagesRecentlyCompleted.slice(t,e)},numberTotal:function(){return this.imagesToAnalyse.length},successfulPercentage:function(){var t=0;return this.numberTotal>0&&(t=this.numberSuccessful/this.numberTotal*100),t.toFixed(2)+"%"}},this.methods={analyseImage:function(t){var e=this;this.imagesToAnalyse.push(t),$.ajax(t.url,{beforeSend:function(){e.imagesInProgress.push(t)},dataType:"json",error:function(n,i,r){e.numberFailed++,e.imagesFailed.push({name:t.name,reason:i}),t.isSuccessful=!1,t.isPending=!1},method:"POST",success:function(n){if(n.is_successful){e.numberSuccessful++,t.isSuccessful=!0,t.isPending=!1,e.imagesRecentlyCompleted.push(t);var i=e.imagesInProgress.indexOf(t);i>-1&&e.imagesInProgress.splice(i,1)}else e.numberFailed++,e.imagesFailed.push({name:t.name,reason:n.message}),t.isSuccessful=!1,t.isPending=!1}})}}}function AnalyseImageViewModel(t){this.isPending=!0,this.isSuccessful=!1,this.name=t.name,this.photoID=t.photo_id,this.url=t.url}function EditPhotosViewModel(t,e,n){this.el="#photos-tab",this.data={albums:[],bulkModifyMethod:"",isSubmitting:!1,photoIDs:[],photoIDsAvailable:[],selectAllInAlbum:0},this.methods={bulkModifySelected:function(t){if(this.isSubmitting)return!0;var n=this,i=$(t.target).closest("form");return"change_album"===this.bulkModifyMethod?(this.promptForNewAlbum(function(t){var e=$("select",t).val();$('input[name="new-album-id"]',i).val(e),n.isSubmitting=!0,$('button[name="bulk-apply"]',i).click(),_bt_showLoadingModal()}),t.preventDefault(),!1):"delete"!==this.bulkModifyMethod||(bootbox.dialog({message:e.delete_bulk_confirm_message,title:e.delete_bulk_confirm_title,buttons:{cancel:{label:e.action_cancel,className:"btn-secondary"},confirm:{label:e.action_delete,className:"btn-danger",callback:function(){n.isSubmitting=!0,$('button[name="bulk-apply"]',i).click(),_bt_showLoadingModal()}}}}),t.preventDefault(),!1)},changeAlbum:function(t){this.selectPhotoSingle(t.target);var e=this.photoIDs[0];return this.photoIDs=[],this.promptForNewAlbum(function(t){var i=$("select",t).val();$.post(n.move_photo.replace(/\/0$/,"/"+e),{new_album_id:i},function(){window.location.reload()})}),t.preventDefault(),!1},deletePhoto:function(t){this.selectPhotoSingle(t.target);var i=this.photoIDs[0];return this.photoIDs=[],bootbox.dialog({message:e.delete_confirm_message,title:e.delete_confirm_title,buttons:{cancel:{label:e.action_cancel,className:"btn-secondary"},confirm:{label:e.action_delete,className:"btn-danger",callback:function(){var t=n.delete_photo;t=t.replace(/\/0$/,"/"+i),$(".loading",parent).show(),$.post(t,{_method:"DELETE"},function(t){window.location.reload()})}}}}),t.preventDefault(),!1},flip:function(t,e,i){var r=n.flip_photo;r=r.replace("/0/","/"+this.photoIDs[0]+"/"),r=t?r.replace(/\/-1\//,"/1/"):r.replace(/\/-1\//,"/0/"),r=e?r.replace(/\/-2$/,"/1"):r.replace(/\/-2$/,"/0"),$(".loading",i).show(),$.post(r,function(){var t=$("img.photo-thumbnail",i),e=t.data("original-src");t.attr("src",e+"&_="+(new Date).getTime()),$(".loading",i).hide()}),this.photoIDs=[]},flipBoth:function(t){return this.selectPhotoLine truncated
|
||||
function AboutViewModel(t){this.el="#about-app",this.data={can_upgrade:!1,is_loading:!0,version_body:"",version_date:"",version_name:"",version_url:""},this.computed={},this.methods={init:function(){var e=this;$.ajax(t.latest_release_url,{complete:function(){e.is_loading=!1},dataType:"json",error:function(t,e,n){},method:"GET",success:function(t){e.version_body=t.body,e.version_date=t.publish_date,e.version_name=t.name,e.version_url=t.url,e.can_upgrade=t.can_upgrade}})}}}function CreateAlbumViewModel(){this.el="#create-album-app",this.data={is_inherit_permissions:!0,is_private:!1,parent_id:""},this.computed={isParentAlbum:function(){return""==this.parent_id},isPrivateDisabled:function(){return!this.isParentAlbum&&this.is_inherit_permissions}}}function EditAlbumViewModel(){this.el="#edit-album-app",this.data={parent_id:""},this.computed={isParentAlbum:function(){return""==this.parent_id}}}function SettingsViewModel(t,e){this.el="#settings-app",this.data={is_rebuilding_permissions_cache:!1},this.methods={rebuildPermissionsCache:function(n){var i=this;return $.ajax(t.rebuild_permissions_cache,{complete:function(){i.is_rebuilding_permissions_cache=!1},dataType:"json",error:function(t,n,i){alert(e.permissions_cache_rebuild_failed)},method:"POST",success:function(t){alert(e.permissions_cache_rebuild_succeeded)}}),n.preventDefault(),!1}}}function AnalyseAlbumViewModel(){this.el="#analyse-album",this.data={imagesFailed:[],imagesToAnalyse:[],imagesInProgress:[],imagesRecentlyCompleted:[],numberSuccessful:0,numberFailed:0},this.computed={failedPercentage:function(){var t=0;return this.numberTotal>0&&(t=this.numberFailed/this.numberTotal*100),t.toFixed(2)+"%"},isCompleted:function(){return this.numberTotal>0&&this.numberSuccessful+this.numberFailed>=this.numberTotal},latestCompletedImages:function(){var t=this.imagesRecentlyCompleted.length-3<0?0:this.imagesRecentlyCompleted.length-3,e=t+3;return this.imagesRecentlyCompleted.slice(t,e)},numberTotal:function(){return this.imagesToAnalyse.length},successfulPercentage:function(){var t=0;return this.numberTotal>0&&(t=this.numberSuccessful/this.numberTotal*100),t.toFixed(2)+"%"}},this.methods={analyseImage:function(t){var e=this;this.imagesToAnalyse.push(t),$.ajax(t.url,{beforeSend:function(){e.imagesInProgress.push(t)},dataType:"json",error:function(n,i,r){e.numberFailed++,e.imagesFailed.push({name:t.name,reason:i}),t.isSuccessful=!1,t.isPending=!1},method:"POST",success:function(n){if(n.is_successful){e.numberSuccessful++,t.isSuccessful=!0,t.isPending=!1,e.imagesRecentlyCompleted.push(t);var i=e.imagesInProgress.indexOf(t);i>-1&&e.imagesInProgress.splice(i,1)}else e.numberFailed++,e.imagesFailed.push({name:t.name,reason:n.message}),t.isSuccessful=!1,t.isPending=!1}})}}}function AnalyseImageViewModel(t){this.isPending=!0,this.isSuccessful=!1,this.name=t.name,this.photoID=t.photo_id,this.url=t.url}function EditPhotosViewModel(t,e,n){this.el="#photos-tab",this.data={albums:[],bulkModifyMethod:"",isSubmitting:!1,photoIDs:[],photoIDsAvailable:[],selectAllInAlbum:0},this.methods={bulkModifySelected:function(t){if(this.isSubmitting)return!0;var n=this,i=$(t.target).closest("form");return"change_album"===this.bulkModifyMethod?(this.promptForNewAlbum(function(t){var e=$("select",t).val();$('input[name="new-album-id"]',i).val(e),n.isSubmitting=!0,$('button[name="bulk-apply"]',i).click(),_bt_showLoadingModal()}),t.preventDefault(),!1):"delete"!==this.bulkModifyMethod||(bootbox.dialog({message:e.delete_bulk_confirm_message,title:e.delete_bulk_confirm_title,buttons:{cancel:{label:e.action_cancel,className:"btn-secondary"},confirm:{label:e.action_delete,className:"btn-danger",callback:function(){n.isSubmitting=!0,$('button[name="bulk-apply"]',i).click(),_bt_showLoadingModal()}}}}),t.preventDefault(),!1)},changeAlbum:function(t){this.selectPhotoSingle(t.target);var e=this.photoIDs[0];return this.photoIDs=[],this.promptForNewAlbum(function(t){var i=$("select",t).val();$.post(n.move_photo.replace(/\/0$/,"/"+e),{new_album_id:i},function(){window.location.reload()})}),t.preventDefault(),!1},deletePhoto:function(t){this.selectPhotoSingle(t.target);var i=this.photoIDs[0];return this.photoIDs=[],bootbox.dialog({message:e.delete_confirm_message,title:e.delete_confirm_title,buttons:{cancel:{label:e.action_cancel,className:"btn-secondary"},confirm:{label:e.action_delete,className:"btn-danger",callback:function(){var t=n.delete_photo;t=t.replace(/\/0$/,"/"+i),$(".loading",parent).show(),$.post(t,{_method:"DELETE"},function(t){window.location.reload()})}}}}),t.preventDefault(),!1},flip:function(t,e,i){var r=n.flip_photo;r=r.replace("/0/","/"+this.photoIDs[0]+"/"),r=t?r.replace(/\/-1\//,"/1/"):r.replace(/\/-1\//,"/0/"),r=e?r.replace(/\/-2$/,"/1"):r.replace(/\/-2$/,"/0"),$(".loading",i).show(),$.post(r,function(){var t=$("img.photo-thumbnail",i),e=t.data("original-src");t.attr("src",e+"&_="+(new Date).getTime()),$(".loading",i).hide()}),this.photoIDs=[]},flipBoth:function(t){return this.selectPhotoLine truncated
|
||||
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
@@ -0,0 +1,1000 @@
|
||||
Version 4.8.3 (2018-09-13)
|
||||
Fixed a bug where the Wordcount Plugin didn't correctly count words within tables on IE11. #TINY-1770
|
||||
Fixed a bug where it wasn't possible to move the caret out of a table on IE11 and Firefox. #TINY-1682
|
||||
Fixed a bug where merging empty blocks didn't work as expected, sometimes causing content to be deleted. #TINY-1781
|
||||
Fixed a bug where the Textcolor Plugin didn't show the correct current color. #TINY-1810
|
||||
Fixed a bug where clear formatting with a collapsed selection would sometimes clear formatting from more content than expected. #TINY-1813 #TINY-1821
|
||||
Fixed a bug with the Table Plugin where it wasn't possible to keyboard navigate to the caption. #TINY-1818
|
||||
Version 4.8.2 (2018-08-09)
|
||||
Moved annotator from "experimental" to "annotator" object on editor. #TBS-2398
|
||||
Improved the multiclick normalization across browsers. #TINY-1788
|
||||
Fixed a bug where running getSelectedBlocks with a collapsed selection between block elements would produce incorrect results. #TINY-1787
|
||||
Fixed a bug where the ScriptLoaders loadScript method would not work as expected in FireFox when loaded on the same page as a ShadowDOM polyfill. #TINY-1786
|
||||
Removed reference to ShadowDOM event.path as Blink based browsers now support event.composedPath. #TINY-1785
|
||||
Fixed a bug where a reference to localStorage would throw an "access denied" error in IE11 with strict security settings. #TINY-1782
|
||||
Fixed a bug where pasting using the toolbar button on an inline editor in IE11 would cause a looping behaviour. #TINY-1768
|
||||
Version 4.8.1 (2018-07-26)
|
||||
Fixed a bug where the content of inline editors was being cleaned on every call of `editor.save()`. #TINY-1783
|
||||
Fixed a bug where the arrow of the Inlite Theme toolbar was being rendered incorrectly in RTL mode. #TINY-1776
|
||||
Fixed a bug with the Paste Plugin where pasting after inline contenteditable false elements moved the caret to the end of the line. #TINY-1758
|
||||
Version 4.8.0 (2018-06-27)
|
||||
Added new "experimental" object in editor, with initial Annotator API. #TBS-2374
|
||||
Fixed a bug where deleting paragraphs inside of table cells would delete the whole table cell. #TINY-1759
|
||||
Fixed a bug in the Table Plugin where removing row height set on the row properties dialog did not update the table. #TINY-1730
|
||||
Fixed a bug with the font select toolbar item didn't update correctly. #TINY-1683
|
||||
Fixed a bug where all bogus elements would not be deleted when removing an inline editor. #TINY-1669
|
||||
Version 4.7.13 (2018-05-16)
|
||||
Fixed a bug where Edge 17 wouldn't be able to select images or tables. #TINY-1679
|
||||
Fixed issue where whitespace wasn't preserved when the editor was initialized on pre elements. #TINY-1649
|
||||
Fixed a bug with the fontselect dropdowns throwing an error if the editor was hidden in Firefox. #TINY-1664
|
||||
Fixed a bug where it wasn't possible to merge table cells on IE 11. #TINY-1671
|
||||
Fixed a bug where textcolor wasn't applying properly on IE 11 in some situations. #TINY-1663
|
||||
Fixed a bug where the justifyfull command state wasn't working correctly. #TINY-1677
|
||||
Fixed a bug where the styles wasn't updated correctly when resizing some tables. #TINY-1668
|
||||
Added missing code menu item from the default menu config. #TINY-1648
|
||||
Added new align button for combining the separate align buttons into a menu button. #TINY-1652
|
||||
Version 4.7.12 (2018-05-03)
|
||||
Added an option to filter out image svg data urls.
|
||||
Added support for html5 details and summary elements.
|
||||
Changed so the mce-abs-layout-item css rule targets html instead of body. Patch contributed by nazar-pc.
|
||||
Fixed a bug where the "read" step on the mobile theme was still present on android mobile browsers.
|
||||
Fixed a bug where all images in the editor document would reload on any editor change.
|
||||
Fixed a bug with the Table Plugin where ObjectResized event wasn't being triggered on column resize.
|
||||
Fixed so the selection is set to the first suitable caret position after editor.setContent called.
|
||||
Fixed so links with xlink:href attributes are filtered correctly to prevent XSS.
|
||||
Fixed a bug on IE11 where pasting content into an inline editor initialized on a heading element would create new editable elements.
|
||||
Fixed a bug where readonly mode would not work as expected when the editor contained contentEditable=true elements.
|
||||
Fixed a bug where the Link Plugin would throw an error when used together with the webcomponents polyfill. Patch contributed by 4esnog.
|
||||
Fixed a bug where the "Powered by TinyMCE" branding link would break on XHTML pages. Patch contributed by tistre.
|
||||
Fixed a bug where the same id would be used in the blobcache for all pasted images. Patch contributed by thorn0.
|
||||
Version 4.7.11 (2018-04-11)
|
||||
Added a new imagetools_credentials_hosts option to the Imagetools Plugin.
|
||||
Fixed a bug where toggling a list containing empty LIs would throw an error. Patch contributed by bradleyke.
|
||||
Fixed a bug where applying block styles to a text with the caret at the end of the paragraph would select all text in the paragraph.
|
||||
Fixed a bug where toggling on the Spellchecker Plugin would trigger isDirty on the editor.
|
||||
Fixed a bug where it was possible to enter content into selection bookmark spans.
|
||||
Fixed a bug where if a non paragraph block was configured in forced_root_block the editor.getContent method would return incorrect values with an empty editor.
|
||||
Fixed a bug where dropdown menu panels stayed open and fixed in position when dragging dialog windows.
|
||||
Fixed a bug where it wasn't possible to extend table cells with the space button in Safari.
|
||||
Fixed a bug where the setupeditor event would thrown an error when using the Compat3x Plugin.
|
||||
Fixed a bug where an error was thrown in FontInfo when called on a detached element.
|
||||
Version 4.7.10 (2018-04-03)
|
||||
Removed the "read" step from the mobile theme.
|
||||
Added normalization of triple clicks across browsers in the editor.
|
||||
Added a `hasFocus` method to the editor that checks if the editor has focus.
|
||||
Added correct icon to the Nonbreaking Plugin menu item.
|
||||
Fixed so the `getContent`/`setContent` methods work even if the editor is not initialized.
|
||||
Fixed a bug with the Media Plugin where query strings were being stripped from youtube links.
|
||||
Fixed a bug where image styles were changed/removed when opening and closing the Image Plugin dialog.
|
||||
Fixed a bug in the Table Plugin where some table cell styles were not correctly added to the content html.
|
||||
Fixed a bug in the Spellchecker Plugin where it wasn't possible to change the spellchecker language.
|
||||
Fixed so the the unlink action in the Link Plugin has a menu item and can be added to the contextmenu.
|
||||
Fixed a bug where it wasn't possible to keyboard navigate to the start of an inline element on a new line within the same block element.
|
||||
Fixed a bug with the Text Color Plugin where if used with an inline editor located at the bottom of the screen the colorpicker could appear off screen.
|
||||
Fixed a bug with the UndoManager where undo levels were being added for nbzwsp characters.
|
||||
Fixed a bug with the Table Plugin where the caret would sometimes be lost when keyboard navigating up through a table.
|
||||
Fixed a bug where FontInfo.getFontFamily would throw an error when called on a removed editor.
|
||||
Fixed a bug in Firefox where undo levels were not being added correctly for some specific operations.
|
||||
Fixed a bug where initializing an inline editor inside of a table would make the whole table resizeable.
|
||||
Fixed a bug where the fake cursor that appears next to tables on Firefox was positioned incorrectly when switching to fullscreen.
|
||||
Fixed a bug where zwsp's weren't trimmed from the output from `editor.getContent({ format: 'text' })`.
|
||||
Fixed a bug where the fontsizeselect/fontselect toolbar items showed the body info rather than the first possible caret position info on init.
|
||||
Fixed a bug where it wasn't possible to select all content if the editor only contained an inline boundary element.
|
||||
Fixed a bug where `content_css` urls with query strings wasn't working.
|
||||
Fixed a bug in the Table Plugin where some table row styles were removed when changing other styles in the row properties dialog.
|
||||
Version 4.7.9 (2018-02-27)
|
||||
Fixed a bug where the editor target element didn't get the correct style when removing the editor.
|
||||
Version 4.7.8 (2018-02-26)
|
||||
Fixed an issue with the Help Plugin where the menuitem name wasn't lowercase.
|
||||
Fixed an issue on MacOS where text and bold text did not have the same line-height in the autocomplete dropdown in the Link Plugin dialog.
|
||||
Fixed a bug where the "paste as text" option in the Paste Plugin didn't work.
|
||||
Fixed a bug where dialog list boxes didn't get positioned correctly in documents with scroll.
|
||||
Fixed a bug where the Inlite Theme didn't use the Table Plugin api to insert correct tables.
|
||||
Fixed a bug where the Inlite Theme panel didn't hide on blur in a correct way.
|
||||
Fixed a bug where placing the cursor before a table in Firefox would scroll to the bottom of the table.
|
||||
Fixed a bug where selecting partial text in table cells with rowspans and deleting would produce faulty tables.
|
||||
Fixed a bug where the Preview Plugin didn't work on Safari due to sandbox security.
|
||||
Fixed a bug where table cell selection using the keyboard threw an error.
|
||||
Fixed so the font size and font family doesn't toggle the text but only sets the selected format on the selected text.
|
||||
Fixed so the built-in spellchecking on Chrome and Safari creates an undo level when replacing words.
|
||||
Version 4.7.7 (2018-02-19)
|
||||
Added a border style selector to the advanced tab of the Image Plugin.
|
||||
Added better controls for default table inserted by the Table Plugin.
|
||||
Added new `table_responsive_width` option to the Table Plugin that controls whether to use pixel or percentage widths.
|
||||
Fixed a bug where the Link Plugin text didn't update when a URL was pasted using the context menu.
|
||||
Fixed a bug with the Spellchecker Plugin where using "Add to dictionary" in the context menu threw an error.
|
||||
Fixed a bug in the Media Plugin where the preview node for iframes got default width and height attributes that interfered with width/height styles.
|
||||
Fixed a bug where backslashes were being added to some font family names in Firefox in the fontselect toolbar item.
|
||||
Fixed a bug where errors would be thrown when trying to remove an editor that had not yet been fully initialized.
|
||||
Fixed a bug where the Imagetools Plugin didn't update the images atomically.
|
||||
Fixed a bug where the Fullscreen Plugin was throwing errors when being used on an inline editor.
|
||||
Fixed a bug where drop down menus weren't positioned correctly in inline editors on scroll.
|
||||
Fixed a bug with a semicolon missing at the end of the bundled javascript files.
|
||||
Fixed a bug in the Table Plugin with cursor navigation inside of tables where the cursor would sometimes jump into an incorrect table cells.
|
||||
Fixed a bug where indenting a table that is a list item using the "Increase indent" button would create a nested table.
|
||||
Fixed a bug where text nodes containing only whitespace were being wrapped by paragraph elements.
|
||||
Fixed a bug where whitespace was being inserted after br tags inside of paragraph tags.
|
||||
Fixed a bug where converting an indented paragraph to a list item would cause the list item to have extra padding.
|
||||
Fixed a bug where Copy/Paste in an editor with a lot of content would cause the editor to scroll to the top of the content in IE11.
|
||||
Fixed a bug with a memory leak in the DragHelper. Path contributed by ben-mckernan.
|
||||
Fixed a bug where the advanced tab in the Media Plugin was being shown even if it didn't contain anything. Patch contributed by gabrieeel.
|
||||
Fixed an outdated eventname in the EventUtils. Patch contributed by nazar-pc.
|
||||
Fixed an issue where the Json.parse function would throw an error when being used on a page with strict CSP settings.
|
||||
Fixed so you can place the curser before and after table elements within the editor in Firefox and Edge/IE.
|
||||
Version 4.7.6 (2018-01-29)
|
||||
Fixed a bug in the jquery integration where it threw an error saying that "global is not defined".
|
||||
Fixed a bug where deleting a table cell whose previous sibling was set to contenteditable false would create a corrupted table.
|
||||
Fixed a bug where highlighting text in an unfocused editor did not work correctly in IE11/Edge.
|
||||
Fixed a bug where the table resize handles were not being repositioned when activating the Fullscreen Plugin.
|
||||
Fixed a bug where the Imagetools Plugin dialog didn't honor editor RTL settings.
|
||||
Fixed a bug where block elements weren't being merged correctly if you deleted from after a contenteditable false element to the beginning of another block element.
|
||||
Fixed a bug where TinyMCE didn't work with module loaders like webpack.
|
||||
Version 4.7.5 (2018-01-22)
|
||||
Fixed bug with the Codesample Plugin where it wasn't possible to edit codesamples when the editor was in inline mode.
|
||||
Fixed bug where focusing on the status bar broke the keyboard navigation functionality.
|
||||
Fixed bug where an error would be thrown on Edge by the Table Plugin when pasting using the PowerPaste Plugin.
|
||||
Fixed bug in the Table Plugin where selecting row border style from the dropdown menu in advanced row properties would throw an error.
|
||||
Fixed bug with icons being rendered incorrectly on Chrome on Mac OS.
|
||||
Fixed bug in the Textcolor Plugin where the font color and background color buttons wouldn't trigger an ExecCommand event.
|
||||
Fixed bug in the Link Plugin where the url field wasn't forced LTR.
|
||||
Fixed bug where the Nonbreaking Plugin incorrectly inserted spaces into tables.
|
||||
Fixed bug with the inline theme where the toolbar wasn't repositioned on window resize.
|
||||
Version 4.7.4 (2017-12-05)
|
||||
Fixed bug in the Nonbreaking Plugin where the nonbreaking_force_tab setting was being ignored.
|
||||
Fixed bug in the Table Plugin where changing row height incorrectly converted column widths to pixels.
|
||||
Fixed bug in the Table Plugin on Edge and IE11 where resizing the last column after resizing the table would cause invalid column heights.
|
||||
Fixed bug in the Table Plugin where keyboard navigation was not normalized between browsers.
|
||||
Fixed bug in the Table Plugin where the colorpicker button would show even without defining the colorpicker_callback.
|
||||
Fixed bug in the Table Plugin where it wasn't possible to set the cell background color.
|
||||
Fixed bug where Firefox would throw an error when intialising an editor on an element that is hidden or not yet added to the DOM.
|
||||
Fixed bug where Firefox would throw an error when intialising an editor inside of a hidden iframe.
|
||||
Version 4.7.3 (2017-11-23)
|
||||
Added functionality to open the Codesample Plugin dialog when double clicking on a codesample. Patch contributed by dakuzen.
|
||||
Fixed bug where undo/redo didn't work correctly with some formats and caret positions.
|
||||
Fixed bug where the color picker didn't show up in Table Plugin dialogs.
|
||||
Fixed bug where it wasn't possible to change the width of a table through the Table Plugin dialog.
|
||||
Fixed bug where the Charmap Plugin couldn't insert some special characters.
|
||||
Fixed bug where editing a newly inserted link would not actually edit the link but insert a new link next to it.
|
||||
Fixed bug where deleting all content in a table cell made it impossible to place the caret into it.
|
||||
Fixed bug where the vertical alignment field in the Table Plugin cell properties dialog didn't do anything.
|
||||
Fixed bug where an image with a caption showed two sets of resize handles in IE11.
|
||||
Fixed bug where pressing the enter button inside of an h1 with contenteditable set to true would sometimes produce a p tag.
|
||||
Fixed bug with backspace not working as expected before a noneditable element.
|
||||
Fixed bug where operating on tables with invalid rowspans would cause an error to be thrown.
|
||||
Fixed so a real base64 representation of the image is available on the blobInfo that the images_upload_handler gets called with.
|
||||
Fixed so the image upload tab is available when the images_upload_handler is defined (and not only when the images_upload_url is defined).
|
||||
Version 4.7.2 (2017-11-07)
|
||||
Added newly rewritten Table Plugin.
|
||||
Added support for attributes with colon in valid_elements and addValidElements.
|
||||
Added support for dailymotion short url in the Media Plugin. Patch contributed by maat8.
|
||||
Added support for converting to half pt when converting font size from px to pt. Patch contributed by danny6514.
|
||||
Added support for location hash to the Autosave plugin to make it work better with SPAs using hash routing.
|
||||
Added support for merging table cells when pasting a table into another table.
|
||||
Changed so the language packs are only loaded once. Patch contributed by 0xor1.
|
||||
Simplified the css for inline boundaries selection by switching to an attribute selector.
|
||||
Fixed bug where an error would be thrown on editor initialization if the window.getSelection() returned null.
|
||||
Fixed bug where holding down control or alt keys made the keyboard navigation inside an inline boundary not work as expected.
|
||||
Fixed bug where applying formats in IE11 produced extra, empty paragraphs in the editor.
|
||||
Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly.
|
||||
Fixed bug where removing an inline editor removed the element that the editor had been initialized on.
|
||||
Fixed bug where setting the selection to the end of an editable container caused some formatting problems.
|
||||
Fixed bug where an error would be thrown sometimes when an editor was removed because of the selection bookmark was being stored asynchronously.
|
||||
Fixed a bug where an editor initialized on an empty list did not contain any valid cursor positions.
|
||||
Fixed a bug with the Context Menu Plugin and webkit browsers on Mac where right-clicking inside a table would produce an incorrect selection.
|
||||
Fixed bug where the Image Plugin constrain proportions setting wasn't working as expected.
|
||||
Fixed bug where deleting the last character in a span with decorations produced an incorrect element when typing.
|
||||
Fixed bug where focusing on inline editors made the toolbar flicker when moving between elements quickly.
|
||||
Fixed bug where the selection would be stored incorrectly in inline editors when the mouseup event was fired outside the editor body.
|
||||
Fixed bug where toggling bold at the end of an inline boundary would toggle off the whole word.
|
||||
Fixed bug where setting the skin to false would not stop the loading of some skin css files.
|
||||
Fixed bug in mobile theme where pinch-to-zoom would break after exiting the editor.
|
||||
Fixed bug where sublists of a fully selected list would not be switched correctly when changing list style.
|
||||
Fixed bug where inserting media by source would break the UndoManager.
|
||||
Fixed bug where inserting some content into the editor with a specific selection would replace some content incorrectly.
|
||||
Fixed bug where selecting all content with ctrl+a in IE11 caused problems with untoggling some formatting.
|
||||
Fixed bug where the Search and Replace Plugin left some marker spans in the editor when undoing and redoing after replacing some content.
|
||||
Fixed bug where the editor would not get a scrollbar when using the Fullscreen and Autoresize plugins together.
|
||||
Fixed bug where the font selector would stop working correctly after selecting fonts three times.
|
||||
Fixed so pressing the enter key inside of an inline boundary inserts a br after the inline boundary element.
|
||||
Fixed a bug where it wasn't possible to use tab navigation inside of a table that was inside of a list.
|
||||
Fixed bug where end_container_on_empty_block would incorrectly remove elements.
|
||||
Fixed bug where content_styles weren't added to the Preview Plugin iframe.
|
||||
Fixed so the beforeSetContent/beforeGetContent events are preventable.
|
||||
Fixed bug where changing height value in Table Plugin advanced tab didn't do anything.
|
||||
Fixed bug where it wasn't possible to remove formatting from content in beginning of table cell.
|
||||
Version 4.7.1 (2017-10-09)
|
||||
Fixed bug where theme set to false on an inline editor produced an extra div element after the target element.
|
||||
Fixed bug where the editor drag icon was misaligned with the branding set to false.
|
||||
Fixed bug where doubled menu items were not being removed as expected with the removed_menuitems setting.
|
||||
Fixed bug where the Table of contents plugin threw an error when initialized.
|
||||
Fixed bug where it wasn't possible to add inline formats to text selected right to left.
|
||||
Fixed bug where the paste from plain text mode did not work as expected.
|
||||
Fixed so the style previews do not set color and background color when selected.
|
||||
Fixed bug where the Autolink plugin didn't work as expected with some formats applied on an empty editor.
|
||||
Fixed bug where the Textpattern plugin were throwing errors on some patterns.
|
||||
Fixed bug where the Save plugin saved all editors instead of only the active editor. Patch contributed by dannoe.
|
||||
Version 4.7.0 (2017-10-03)
|
||||
Added new mobile ui that is specifically designed for mobile devices.
|
||||
Updated the default skin to be more modern and white since white is preferred by most implementations.
|
||||
Restructured the default menus to be more similar to common office suites like Google Docs.
|
||||
Fixed so theme can be set to false on both inline and iframe editor modes.
|
||||
Fixed bug where inline editor would add/remove the visualblocks css multiple times.
|
||||
Fixed bug where selection wouldn't be properly restored when editor lost focus and commands where invoked.
|
||||
Fixed bug where toc plugin would generate id:s for headers even though a toc wasn't inserted into the content.
|
||||
Fixed bug where is wasn't possible to drag/drop contents within the editor if paste_data_images where set to true.
|
||||
Fixed bug where getParam and close in WindowManager would get the first opened window instead of the last opened window.
|
||||
Fixed bug where delete would delete between cells inside a table in Firefox.
|
||||
Version 4.6.7 (2017-09-18)
|
||||
Fixed bug where paste wasn't working in IOS.
|
||||
Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly.
|
||||
Fixed bug where inserting a list in a table caused the cell to expand in height.
|
||||
Fixed bug where pressing enter in a list located inside of a table deleted list items instead of inserting new list item.
|
||||
Fixed bug where copy and pasting table cells produced inconsistent results.
|
||||
Fixed bug where initializing an editor with an ID of 'length' would throw an exception.
|
||||
Fixed bug where it was possible to split a non merged table cell.
|
||||
Fixed bug where copy and pasting a list with a very specific selection into another list would produce a nested list.
|
||||
Fixed bug where copy and pasting ordered lists sometimes produced unordered lists.
|
||||
Fixed bug where padded elements inside other elements would be treated as empty.
|
||||
Added some missing translations to Image, Link and Help plugins.
|
||||
Fixed so you can resize images inside a figure element.
|
||||
Fixed bug where an inline TinyMCE editor initialized on a table did not set selection on load in Chrome.
|
||||
Fixed the positioning of the inlite toolbar when the target element wasn't big enough to fit the toolbar.
|
||||
Version 4.6.6 (2017-08-30)
|
||||
Fixed so that notifications wrap long text content instead of bleeding outside the notification element.
|
||||
Fixed so the content_style css is added after the skin and custom stylesheets.
|
||||
Fixed bug where it wasn't possible to remove a table with the Cut button.
|
||||
Fixed bug where the center format wasn't getting the same font size as the other formats in the format preview.
|
||||
Fixed bug where the wordcount plugin wasn't counting hyphenated words correctly.
|
||||
Fixed bug where all content pasted into the editor was added to the end of the editor.
|
||||
Fixed bug where enter keydown on list item selection only deleted content and didn't create a new line.
|
||||
Fixed bug where destroying the editor while the content css was still loading caused error notifications on Firefox.
|
||||
Fixed bug where undoing cut operation in IE11 left some unwanted html in the editor content.
|
||||
Fixed bug where enter keydown would throw an error in IE11.
|
||||
Fixed bug where duplicate instances of an editor were added to the editors array when using the createEditor API.
|
||||
Fixed bug where the formatter applied formats on the wrong content when spellchecker was activated.
|
||||
Fixed bug where switching formats would reset font size on child nodes.
|
||||
Fixed bug where the table caption element weren't always the first descendant to the table tag.
|
||||
Fixed bug where pasting some content into the editor on chrome some newlines were removed.
|
||||
Fixed bug where it wasn't possible to remove a list if a list item was a table element.
|
||||
Fixed bug where copy/pasting partial selections of tables wouldn't produce a proper table.
|
||||
Fixed bug where the searchreplace plugin could not find consecutive spaces.
|
||||
Fixed bug where background color wasn't applied correctly on some partially selected contents.
|
||||
Version 4.6.5 (2017-08-02)
|
||||
Added new inline_boundaries_selector that allows you to specify the elements that should have boundaries.
|
||||
Added new local upload feature this allows the user to upload images directly from the image dialog.
|
||||
Added a new api for providing meta data for plugins. It will show up in the help dialog if it's provided.
|
||||
Fixed so that the notifications created by the notification manager are more screen reader accessible.
|
||||
Fixed bug where changing the list format on multiple selected lists didn't change all of the lists.
|
||||
Fixed bug where the nonbreaking plugin would insert multiple undo levels when pressing the tab key.
|
||||
Fixed bug where delete/backspace wouldn't render a caret when all editor contents where deleted.
|
||||
Fixed bug where delete/backspace wouldn't render a caret if the deleted element was a single contentEditable false element.
|
||||
Fixed bug where the wordcount plugin wouldn't count words correctly if word where typed after applying a style format.
|
||||
Fixed bug where the wordcount plugin would count mathematical formulas as multiple words for example 1+1=2.
|
||||
Fixed bug where formatting of triple clicked blocks on Chrome/Safari would result in styles being added outside the visual selection.
|
||||
Fixed bug where paste would add the contents to the end of the editor area when inline mode was used.
|
||||
Fixed bug where toggling off bold formatting on text entered in a new paragraph would add an extra line break.
|
||||
Fixed bug where autolink plugin would only produce a link on every other consecutive link on Firefox.
|
||||
Fixed bug where it wasn't possible to select all contents if the content only had one pre element.
|
||||
Fixed bug where sizzle would produce lagging behavior on some sites due to repaints caused by feature detection.
|
||||
Fixed bug where toggling off inline formats wouldn't include the space on selected contents with leading or trailing spaces.
|
||||
Fixed bug where the cut operation in UI wouldn't work in Chrome.
|
||||
Fixed bug where some legacy editor initialization logic would throw exceptions about editor settings not being defined.
|
||||
Fixed bug where it wasn't possible to apply text color to links if they where part of a non collapsed selection.
|
||||
Fixed bug where an exception would be thrown if the user selected a video element and then moved the focus outside the editor.
|
||||
Fixed bug where list operations didn't work if there where block elements inside the list items.
|
||||
Fixed bug where applying block formats to lists wrapped in block elements would apply to all elements in that wrapped block.
|
||||
Version 4.6.4 (2017-06-13)
|
||||
Fixed bug where the editor would move the caret when clicking on the scrollbar next to a content editable false block.
|
||||
Fixed bug where the text color select dropdowns wasn't placed correctly when they didn't fit the width of the screen.
|
||||
Fixed bug where the default editor line height wasn't working for mixed font size contents.
|
||||
Fixed bug where the content css files for inline editors were loaded multiple times for multiple editor instances.
|
||||
Fixed bug where the initial value of the font size/font family dropdowns wasn't displayed.
|
||||
Fixed bug where the I18n api was not supporting arrays as the translation replacement values.
|
||||
Fixed bug where chrome would display "The given range isn't in document." errors for invalid ranges passed to setRng.
|
||||
Fixed bug where the compat3x plugin wasn't working since the global tinymce references wasn't resolved correctly.
|
||||
Fixed bug where the preview plugin wasn't encoding the base url passed into the iframe contents producing a xss bug.
|
||||
Fixed bug where the dom parser/serializer wasn't handling some special elements like noframes, title and xmp.
|
||||
Fixed bug where the dom parser/serializer wasn't handling cdata sections with comments inside.
|
||||
Fixed bug where the editor would scroll to the top of the editable area if a dialog was closed in inline mode.
|
||||
Fixed bug where the link dialog would not display the right rel value if rel_list was configured.
|
||||
Fixed bug where the context menu would select images on some platforms but not others.
|
||||
Fixed bug where the filenames of images were not retained on dragged and drop into the editor from the desktop.
|
||||
Fixed bug where the paste plugin would misrepresent newlines when pasting plain text and having forced_root_block configured.
|
||||
Fixed so that the error messages for the imagetools plugin is more human readable.
|
||||
Fixed so the internal validate setting for the parser/serializer can't be set from editor initialization settings.
|
||||
Version 4.6.3 (2017-05-30)
|
||||
Fixed bug where the arrow keys didn't work correctly when navigating on nested inline boundary elements.
|
||||
Fixed bug where delete/backspace didn't work correctly on nested inline boundary elements.
|
||||
Fixed bug where image editing didn't work on subsequent edits of the same image.
|
||||
Fixed bug where charmap descriptions wouldn't properly wrap if they exceeded the width of the box.
|
||||
Fixed bug where the default image upload handler only accepted 200 as a valid http status code.
|
||||
Fixed so rel on target=_blank links gets forced with only noopener instead of both noopener and noreferrer.
|
||||
Version 4.6.2 (2017-05-23)
|
||||
Fixed bug where the SaxParser would run out of memory on very large documents.
|
||||
Fixed bug with formatting like font size wasn't applied to del elements.
|
||||
Fixed bug where various api calls would be throwing exceptions if they where invoked on a removed editor instance.
|
||||
Fixed bug where the branding position would be incorrect if the editor was inside a hidden tab and then later showed.
|
||||
Fixed bug where the color levels feature in the imagetools dialog wasn't working properly.
|
||||
Fixed bug where imagetools dialog wouldn't pre-load images from CORS domains, before trying to prepare them for editing.
|
||||
Fixed bug where the tab key would move the caret to the next table cell if being pressed inside a list inside a table.
|
||||
Fixed bug where the cut/copy operations would loose parent context like the current format etc.
|
||||
Fixed bug with format preview not working on invalid elements excluded by valid_elements.
|
||||
Fixed bug where blocks would be merged in incorrect order on backspace/delete.
|
||||
Fixed bug where zero length text nodes would cause issues with the undo logic if there where iframes present.
|
||||
Fixed bug where the font size/family select lists would throw errors if the first node was a comment.
|
||||
Fixed bug with csp having to allow local script evaluation since it was used to detect global scope.
|
||||
Fixed bug where CSP required a relaxed option for javascript: URLs in unsupported legacy browsers.
|
||||
Fixed bug where a fake caret would be rendered for td with the contenteditable=false.
|
||||
Fixed bug where typing would be blocked on IE 11 when within a nested contenteditable=true/false structure.
|
||||
Version 4.6.1 (2017-05-10)
|
||||
Added configuration option to list plugin to disable tab indentation.
|
||||
Fixed bug where format change on very specific content could cause the selection to change.
|
||||
Fixed bug where TinyMCE could not be lazyloaded through jquery integration.
|
||||
Fixed bug where entities in style attributes weren't decoded correctly on paste in webkit.
|
||||
Fixed bug where fontsize_formats option had been renamed incorrectly.
|
||||
Fixed bug with broken backspace/delete behaviour between contenteditable=false blocks.
|
||||
Fixed bug where it wasn't possible to backspace to the previous line with the inline boundaries functionality turned on.
|
||||
Fixed bug where is wasn't possible to move caret left and right around a linked image with the inline boundaries functionality turned on.
|
||||
Fixed bug where pressing enter after/before hr element threw exception. Patch contributed bradleyke.
|
||||
Fixed so the CSS in the visualblocks plugin doesn't overwrite background color. Patch contributed by Christian Rank.
|
||||
Fixed bug where multibyte characters weren't encoded correctly. Patch contributed by James Tarkenton.
|
||||
Fixed bug where shift-click to select within contenteditable=true fields wasn't working.
|
||||
Version 4.6.0 (2017-05-04)
|
||||
Dropped support for IE 8-10 due to market share and lack of support from Microsoft. See tinymce docs for details.
|
||||
Added an inline boundary caret position feature that makes it easier to type at the beginning/end of links/code elements.
|
||||
Added a help plugin that adds a button and a dialog showing the editor shortcuts and loaded plugins.
|
||||
Added an inline_boundaries option that allows you to disable the inline boundary feature if it's not desired.
|
||||
Added a new ScrollIntoView event that allows you to override the default scroll to element behavior.
|
||||
Added role and aria- attributes as valid elements in the default valid elements config.
|
||||
Added new internal flag for PastePreProcess/PastePostProcess this is useful to know if the paste was coming from an external source.
|
||||
Added new ignore function to UndoManager this works similar to transact except that it doesn't add an undo level by default.
|
||||
Fixed so that urls gets retained for images when being edited. This url is then passed on to the upload handler.
|
||||
Fixed so that the editors would be initialized on readyState interactive instead of complete.
|
||||
Fixed so that the init event of the editor gets fired once all contentCSS files have been properly loaded.
|
||||
Fixed so that width/height of the editor gets taken from the textarea element if it's explicitly specified in styles.
|
||||
Fixed so that keep_styles set to false no longer clones class/style from the previous paragraph on enter.
|
||||
Fixed so that the default line-height is 1.2em to avoid zwnbsp characters from producing text rendering glitches on Windows.
|
||||
Fixed so that loading errors of content css gets presented by a notification message.
|
||||
Fixed so figure image elements can be linked when selected this wraps the figure image in a anchor element.
|
||||
Fixed bug where it wasn't possible to copy/paste rows with colspans by using the table copy/paste feature.
|
||||
Fixed bug where the protect setting wasn't properly applied to header/footer parts when using the fullpage plugin.
|
||||
Fixed bug where custom formats that specified upper case element names where not applied correctly.
|
||||
Fixed bug where some screen readers weren't reading buttons due to an aria specific fix for IE 8.
|
||||
Fixed bug where cut wasn't working correctly on iOS due to it's clipboard API not working correctly.
|
||||
Fixed bug where Edge would paste div elements instead of paragraphs when pasting plain text.
|
||||
Fixed bug where the textpattern plugin wasn't dealing with trailing punctuations correctly.
|
||||
Fixed bug where image editing would some times change the image format from jpg to png.
|
||||
Fixed bug where some UI elements could be inserted into the toolbar even if they where not registered.
|
||||
Fixed bug where it was possible to click the TD instead of the character in the character map and that caused an exception.
|
||||
Fixed bug where the font size/font family dropdowns would sometimes show an incorrect value due to css not being loaded in time.
|
||||
Fixed bug with the media plugin inserting undefined instead of retaining size when media_dimensions was set to false.
|
||||
Fixed bug with deleting images when forced_root_blocks where set to false.
|
||||
Fixed bug where input focus wasn't properly handled on nested content editable elements.
|
||||
Fixed bug where Chrome/Firefox would throw an exception when selecting images due to recent change of setBaseAndExtent support.
|
||||
Fixed bug where malformed blobs would throw exceptions now they are simply ignored.
|
||||
Fixed bug where backspace/delete wouldn't work properly in some cases where all contents was selected in WebKit.
|
||||
Fixed bug with Angular producing errors since it was expecting events objects to be patched with their custom properties.
|
||||
Fixed bug where the formatter would apply formatting to spellchecker errors now all bogus elements are excluded.
|
||||
Fixed bug with backspace/delete inside table caption elements wouldn't behave properly on IE 11.
|
||||
Fixed bug where typing after a contenteditable false inline element could move the caret to the end of that element.
|
||||
Fixed bug where backspace before/after contenteditable false blocks wouldn't properly remove the right element.
|
||||
Fixed bug where backspace before/after contenteditable false inline elements wouldn't properly empty the current block element.
|
||||
Fixed bug where vertical caret navigation with a custom line-height would sometimes match incorrect positions.
|
||||
Fixed bug with paste on Edge where character encoding wasn't handled properly due to a browser bug.
|
||||
Fixed bug with paste on Edge where extra fragment data was inserted into the contents when pasting.
|
||||
Fixed bug with pasting contents when having a whole block element selected on WebKit could cause WebKit spans to appear.
|
||||
Fixed bug where the visualchars plugin wasn't working correctly showing invisible nbsp characters.
|
||||
Fixed bug where browsers would hang if you tried to load some malformed html contents.
|
||||
Fixed bug where the init call promise wouldn't resolve if the specified selector didn't find any matching elements.
|
||||
Fixed bug where the Schema isValidChild function was case sensitive.
|
||||
Version 4.5.3 (2017-02-01)
|
||||
Added keyboard navigation for menu buttons when the menu is in focus.
|
||||
Added api to the list plugin for setting custom classes/attributes on lists.
|
||||
Added validation for the anchor plugin input field according to W3C id naming specifications.
|
||||
Fixed bug where media placeholders were removed after resize with the forced_root_block setting set to false.
|
||||
Fixed bug where deleting selections with similar sibling nodes sometimes deleted the whole document.
|
||||
Fixed bug with inlite theme where several toolbars would appear scrolling when more than one instance of the editor was in use.
|
||||
Fixed bug where the editor would throw error with the fontselect plugin on hidden editor instances in Firefox.
|
||||
Fixed bug where the background color would not stretch to the font size.
|
||||
Fixed bug where font size would be removed when changing background color.
|
||||
Fixed bug where the undomanager trimmed away whitespace between nodes on undo/redo.
|
||||
Fixed bug where media_dimensions=false in media plugin caused the editor to throw an error.
|
||||
Fixed bug where IE was producing font/u elements within links on paste.
|
||||
Fixed bug where some button tooltips were broken when compat3x was in use.
|
||||
Fixed bug where backspace/delete/typeover would remove the caption element.
|
||||
Fixed bug where powerspell failed to function when compat3x was enabled.
|
||||
Fixed bug where it wasn't possible to apply sub/sup on text with large font size.
|
||||
Fixed bug where pre tags with spaces weren't treated as content.
|
||||
Fixed bug where Meta+A would select the entire document instead of all contents in nested ce=true elements.
|
||||
Version 4.5.2 (2017-01-04)
|
||||
Added missing keyboard shortcut description for the underline menu item in the format menu.
|
||||
Fixed bug where external blob urls wasn't properly handled by editor upload logic. Patch contributed by David Oviedo.
|
||||
Fixed bug where urls wasn't treated as a single word by the wordcount plugin.
|
||||
Fixed bug where nbsp characters wasn't treated as word delimiters by the wordcount plugin.
|
||||
Fixed bug where editor instance wasn't properly passed to the format preview logic. Patch contributed by NullQuery.
|
||||
Fixed bug where the fake caret wasn't hidden when you moved selection to a cE=false element.
|
||||
Fixed bug where it wasn't possible to edit existing code sample blocks.
|
||||
Fixed bug where it wasn't possible to delete editor contents if the selection included an empty block.
|
||||
Fixed bug where the formatter wasn't expanding words on some international characters. Patch contributed by Martin Larochelle.
|
||||
Fixed bug where the open link feature wasn't working correctly on IE 11.
|
||||
Fixed bug where enter before/after a cE=false block wouldn't properly padd the paragraph with an br element.
|
||||
Fixed so font size and font family select boxes always displays a value by using the runtime style as a fallback.
|
||||
Fixed so missing plugins will be logged to console as warnings rather than halting the initialization of the editor.
|
||||
Fixed so splitbuttons become normal buttons in advlist plugin if styles are empty. Patch contributed by René Schleusner.
|
||||
Fixed so you can multi insert rows/cols by selecting table cells and using insert rows/columns.
|
||||
Version 4.5.1 (2016-12-07)
|
||||
Fixed bug where the lists plugin wouldn't initialize without the advlist plugins if served from cdn.
|
||||
Fixed bug where selectors with "*" would cause the style format preview to throw an error.
|
||||
Fixed bug with toggling lists off on lists with empty list items would throw an error.
|
||||
Fixed bug where editing images would produce non existing blob uris.
|
||||
Fixed bug where the offscreen toc selection would be treated as the real toc element.
|
||||
Fixed bug where the aria level attribute for element path would have an incorrect start index.
|
||||
Fixed bug where the offscreen selection of cE=false that where very wide would be shown onscreen. Patch contributed by Steven Bufton.
|
||||
Fixed so the default_link_target gets applied to links created by the autolink plugin.
|
||||
Fixed so that the name attribute gets removed by the anchor plugin if editing anchors.
|
||||
Version 4.5.0 (2016-11-23)
|
||||
Added new toc plugin allows you to insert table of contents based on editor headings.
|
||||
Added new auto complete menu to all url fields. Adds history, link to anchors etc.
|
||||
Added new sidebar api that allows you to add custom sidebar panels and buttons to toggle these.
|
||||
Added new insert menu button that allows you to have multiple insert functions under the same menu button.
|
||||
Added new open link feature to ctrl+click, alt+enter and context menu.
|
||||
Added new media_embed_handler option to allow the media plugin to be populated with custom embeds.
|
||||
Added new support for editing transparent images using the image tools dialog.
|
||||
Added new images_reuse_filename option to allow filenames of images to be retained for upload.
|
||||
Added new security feature where links with target="_blank" will by default get rel="noopener noreferrer".
|
||||
Added new allow_unsafe_link_target to allow you to opt-out of the target="_blank" security feature.
|
||||
Added new style_formats_autohide option to automatically hide styles based on context.
|
||||
Added new codesample_content_css option to specify where the code sample prism css is loaded from.
|
||||
Added new support for Japanese/Chinese word count following the unicode standards on this.
|
||||
Added new fragmented undo levels this dramatically reduces flicker on contents with iframes.
|
||||
Added new live previews for complex elements like table or lists.
|
||||
Fixed bug where it wasn't possible to properly tab between controls in a dialog with a disabled form item control.
|
||||
Fixed bug where firefox would generate a rectangle on elements produced after/before a cE=false elements.
|
||||
Fixed bug with advlist plugin not switching list element format properly in some edge cases.
|
||||
Fixed bug where col/rowspans wasn't correctly computed by the table plugin in some cases.
|
||||
Fixed bug where the table plugin would thrown an error if object_resizing was disabled.
|
||||
Fixed bug where some invalid markup would cause issues when running in XHTML mode. Patch contributed by Charles Bourasseau.
|
||||
Fixed bug where the fullscreen class wouldn't be removed properly when closing dialogs.
|
||||
Fixed bug where the PastePlainTextToggle event wasn't fired by the paste plugin when the state changed.
|
||||
Fixed bug where table the row type wasn't properly updated in table row dialog. Patch contributed by Matthias Balmer.
|
||||
Fixed bug where select all and cut wouldn't place caret focus back to the editor in WebKit. Patch contributed by Daniel Jalkut.
|
||||
Fixed bug where applying cell/row properties to multiple cells/rows would reset other unchanged properties.
|
||||
Fixed bug where some elements in the schema would have redundant/incorrect children.
|
||||
Fixed bug where selector and target options would cause issues if used together.
|
||||
Fixed bug where drag/drop of images from desktop on chrome would thrown an error.
|
||||
Fixed bug where cut on WebKit/Blink wouldn't add an undo level.
|
||||
Fixed bug where IE 11 would scroll to the cE=false elements when they where selected.
|
||||
Fixed bug where keys like F5 wouldn't work when a cE=false element was selected.
|
||||
Fixed bug where the undo manager wouldn't stop the typing state when commands where executed.
|
||||
Fixed bug where unlink on wrapped links wouldn't work properly.
|
||||
Fixed bug with drag/drop of images on WebKit where the image would be deleted form the source editor.
|
||||
Fixed bug where the visual characters mode would be disabled when contents was extracted from the editor.
|
||||
Fixed bug where some browsers would toggle of formats applied to the caret when clicking in the editor toolbar.
|
||||
Fixed bug where the custom theme function wasn't working correctly.
|
||||
Fixed bug where image option for custom buttons required you to have icon specified as well.
|
||||
Fixed bug where the context menu and contextual toolbars would be visible at the same time and sometimes overlapping.
|
||||
Fixed bug where the noneditable plugin would double wrap elements when using the noneditable_regexp option.
|
||||
Fixed bug where tables would get padding instead of margin when you used the indent button.
|
||||
Fixed bug where the charmap plugin wouldn't properly insert non breaking spaces.
|
||||
Fixed bug where the color previews in color input boxes wasn't properly updated.
|
||||
Fixed bug where the list items of previous lists wasn't merged in the right order.
|
||||
Fixed bug where it wasn't possible to drag/drop inline-block cE=false elements on IE 11.
|
||||
Fixed bug where some table cell merges would produce incorrect rowspan/colspan.
|
||||
Fixed so the font size of the editor defaults to 14px instead of 11px this can be overridden by custom css.
|
||||
Fixed so wordcount is debounced to reduce cpu hogging on larger texts.
|
||||
Fixed so tinymce global gets properly exported as a module when used with some module bundlers.
|
||||
Fixed so it's possible to specify what css properties you want to preview on specific formats.
|
||||
Fixed so anchors are contentEditable=false while within the editor.
|
||||
Fixed so selected contents gets wrapped in a inline code element by the codesample plugin.
|
||||
Fixed so conditional comments gets properly stripped independent of case. Patch contributed by Georgii Dolzhykov.
|
||||
Fixed so some escaped css sequences gets properly handled. Patch contributed by Georgii Dolzhykov.
|
||||
Fixed so notifications with the same message doesn't get displayed at the same time.
|
||||
Fixed so F10 can be used as an alternative key to focus to the toolbar.
|
||||
Fixed various api documentation issues and typos.
|
||||
Removed layer plugin since it wasn't really ported from 3.x and there doesn't seem to be much use for it.
|
||||
Removed moxieplayer.swf from the media plugin since it wasn't used by the media plugin.
|
||||
Removed format state from the advlist plugin to be more consistent with common word processors.
|
||||
Version 4.4.3 (2016-09-01)
|
||||
Fixed bug where copy would produce an exception on Chrome.
|
||||
Fixed bug where deleting lists on IE 11 would merge in correct text nodes.
|
||||
Fixed bug where deleting partial lists with indentation wouldn't cause proper normalization.
|
||||
Version 4.4.2 (2016-08-25)
|
||||
Added new importcss_exclusive option to disable unique selectors per group.
|
||||
Added new group specific selector_converter option to importcss plugin.
|
||||
Added new codesample_languages option to apply custom languages to codesample plugin.
|
||||
Added new codesample_dialog_width/codesample_dialog_height options.
|
||||
Fixed bug where fullscreen button had an incorrect keyboard shortcut.
|
||||
Fixed bug where backspace/delete wouldn't work correctly from a block to a cE=false element.
|
||||
Fixed bug where smartpaste wasn't detecting links with special characters in them like tilde.
|
||||
Fixed bug where the editor wouldn't get proper focus if you clicked on a cE=false element.
|
||||
Fixed bug where it wasn't possible to copy/paste table rows that had merged cells.
|
||||
Fixed bug where merging cells could some times produce invalid col/rowspan attibute values.
|
||||
Fixed bug where getBody would sometimes thrown an exception now it just returns null if the iframe is clobbered.
|
||||
Fixed bug where drag/drop of cE=false element wasn't properly constrained to viewport.
|
||||
Fixed bug where contextmenu on Mac would collapse any selection to a caret.
|
||||
Fixed bug where rtl mode wasn't rendered properly when loading a language pack with the rtl flag.
|
||||
Fixed bug where Kamer word bounderies would be stripped from contents.
|
||||
Fixed bug where lists would sometimes render two dots or numbers on the same line.
|
||||
Fixed bug where the skin_url wasn't used by the inlite theme.
|
||||
Fixed so data attributes are ignored when comparing formats in the formatter.
|
||||
Fixed so it's possible to disable inline toolbars in the inlite theme.
|
||||
Fixed so template dialog gets resized if it doesn't fit the window viewport.
|
||||
Version 4.4.1 (2016-07-26)
|
||||
Added smart_paste option to paste plugin to allow disabling the paste behavior if needed.
|
||||
Fixed bug where png urls wasn't properly detected by the smart paste logic.
|
||||
Fixed bug where the element path wasn't working properly when multiple editor instances where used.
|
||||
Fixed bug with creating lists out of multiple paragraphs would just create one list item instead of multiple.
|
||||
Fixed bug where scroll position wasn't properly handled by the inlite theme to place the toolbar properly.
|
||||
Fixed bug where multiple instances of the editor using the inlite theme didn't render the toolbar properly.
|
||||
Fixed bug where the shortcut label for fullscreen mode didn't match the actual shortcut key.
|
||||
Fixed bug where it wasn't possible to select cE=false blocks using touch devices on for example iOS.
|
||||
Fixed bug where it was possible to select the child image within a cE=false on IE 11.
|
||||
Fixed so inserts of html containing lists doesn't merge with any existing lists unless it's a paste operation.
|
||||
Version 4.4.0 (2016-06-30)
|
||||
Added new inlite theme this is a more lightweight inline UI.
|
||||
Added smarter paste logic that auto detects urls in the clipboard and inserts images/links based on that.
|
||||
Added a better image resize algorithm for better image quality in the imagetools plugin.
|
||||
Fixed bug where it wasn't possible to drag/dropping cE=false elements on FF.
|
||||
Fixed bug where backspace/delete before/after a cE=false block would produce a new paragraph.
|
||||
Fixed bug where list style type css property wasn't preserved when indenting lists.
|
||||
Fixed bug where merging of lists where done even if the list style type was different.
|
||||
Fixed bug where the image_dataimg_filter function wasn't used when pasting images.
|
||||
Fixed bug where nested editable within a non editable element would cause scroll on focus in Chrome.
|
||||
Fixed so invalid targets for inline mode is blocked on initialization. We only support elements that can have children.
|
||||
Version 4.3.13 (2016-06-08)
|
||||
Added characters with a diacritical mark to charmap plugin. Patch contributed by Dominik Schilling.
|
||||
Added better error handling if the image proxy service would produce errors.
|
||||
Fixed issue with pasting list items into list items would produce nested list rather than a merged list.
|
||||
Fixed bug where table selection could get stuck in selection mode for inline editors.
|
||||
Fixed bug where it was possible to place the caret inside the resize grid elements.
|
||||
Fixed bug where it wasn't possible to place in elements horizontally adjacent cE=false blocks.
|
||||
Fixed bug where multiple notifications wouldn't be properly placed on screen.
|
||||
Fixed bug where multiple editor instance of the same id could be produces in some specific integrations.
|
||||
Version 4.3.12 (2016-05-10)
|
||||
Fixed bug where focus calls couldn't be made inside the editors PostRender event handler.
|
||||
Fixed bug where some translations wouldn't work as expected due to a bug in editor.translate.
|
||||
Fixed bug where the node change event could fire with a node out side the root of the editor.
|
||||
Fixed bug where Chrome wouldn't properly present the keyboard paste clipboard details when paste was clicked.
|
||||
Fixed bug where merged cells in tables couldn't be selected from right to left.
|
||||
Fixed bug where insert row wouldn't properly update a merged cells rowspan property.
|
||||
Fixed bug where the color input boxes preview field wasn't properly set on initialization.
|
||||
Fixed bug where IME composition inside table cells wouldn't work as expected on IE 11.
|
||||
Fixed so all shadow dom support is under and experimental flag due to flaky browser support.
|
||||
Version 4.3.11 (2016-04-25)
|
||||
Fixed bug where it wasn't possible to insert empty blocks though the API unless they where padded.
|
||||
Fixed bug where you couldn't type the Euro character on Windows.
|
||||
Fixed bug where backspace/delete from a cE=false element to a text block didn't work properly.
|
||||
Fixed bug where the text color default grid would render incorrectly.
|
||||
Fixed bug where the codesample plugin wouldn't load the css in the editor for multiple editors.
|
||||
Fixed so the codesample plugin textarea gets focused by default.
|
||||
Version 4.3.10 (2016-04-12)
|
||||
Fixed bug where the key "y" on WebKit couldn't be entered due to conflict with keycode for F10 on keypress.
|
||||
Version 4.3.9 (2016-04-12)
|
||||
Added support for focusing the contextual toolbars using keyboard.
|
||||
Added keyboard support for slider UI controls. You can no increase/decrease using arrow keys.
|
||||
Added url pattern matching for Dailymotion to media plugin. Patch contributed by Bertrand Darbon.
|
||||
Added body_class to template plugin preview. Patch contributed by Milen Petrinski.
|
||||
Added options to better override textcolor pickers with custom colors. Patch contributed by Xavier Boubert.
|
||||
Added visual arrows to inline contextual toolbars so that they point to the element being active.
|
||||
Fixed so toolbars for tables or other larger elements get better positioned below the scrollable viewport.
|
||||
Fixed bug where it was possible to click links inside cE=false blocks.
|
||||
Fixed bug where event targets wasn't properly handled in Safari Technical Preview.
|
||||
Fixed bug where drag/drop text in FF 45 would make the editor caret invisible.
|
||||
Fixed bug where the remove state wasn't properly set on editor instances when detected as clobbered.
|
||||
Fixed bug where offscreen selection of some cE=false elements would render onscreen. Patch contributed by Steven Bufton
|
||||
Fixed bug where enter would clone styles out side the root on editors inside a span. Patch contributed by ChristophKaser.
|
||||
Fixed bug where drag/drop of images into the editor didn't work correctly in FF.
|
||||
Fixed so the first item in panels for the imagetools dialog gets proper keyboard focus.
|
||||
Changed the Meta+Shift+F shortcut to Ctrl+Shift+F since Czech, Slovak, Polish languages used the first one for input.
|
||||
Version 4.3.8 (2016-03-15)
|
||||
Fixed bug where inserting HR at the end of a block element would produce an extra empty block.
|
||||
Fixed bug where links would be clickable when readonly mode was enabled.
|
||||
Fixed bug where the formatter would normalize to the wrong node on very specific content.
|
||||
Fixed bug where some nested list items couldn't be indented properly.
|
||||
Fixed bug where links where clickable in the preview dialog.
|
||||
Fixed so the alt attribute doesn't get padded with an empty value by default.
|
||||
Fixed so nested alignment works more correctly. You will now alter the alignment to the closest block parent.
|
||||
Version 4.3.7 (2016-03-02)
|
||||
Fixed bug where incorrect icons would be rendered for imagetools edit and color levels.
|
||||
Fixed bug where navigation using arrow keys inside a SelectBox didn't move up/down.
|
||||
Fixed bug where the visualblocks plugin would render borders round internal UI elements.
|
||||
Version 4.3.6 (2016-03-01)
|
||||
Added new paste_remember_plaintext_info option to allow a global disable of the plain text mode notification.
|
||||
Added new PastePlainTextToggle event that fires when plain text mode toggles on/off.
|
||||
Fixed bug where it wasn't possible to select media elements since the drag logic would snap it to mouse cursor.
|
||||
Fixed bug where it was hard to place the caret inside nested cE=true elements when the outer cE=false element was focused.
|
||||
Fixed bug where editors wouldn't properly initialize if both selector and mode where used.
|
||||
Fixed bug where IME input inside table cells would switch the IME off.
|
||||
Fixed bug where selection inside the first table cell would cause the whole table cell to get selected.
|
||||
Fixed bug where error handling of images being uploaded wouldn't properly handle faulty statuses.
|
||||
Fixed bug where inserting contents before a HR would cause an exception to be thrown.
|
||||
Fixed bug where copy/paste of Excel data would be inserted as an image.
|
||||
Fixed caret position issues with copy/paste of inline block cE=false elements.
|
||||
Fixed issues with various menu item focus bugs in Chrome. Where the focused menu bar item wasn't properly blurred.
|
||||
Fixed so the notifications have a solid background since it would be hard to read if there where text under it.
|
||||
Fixed so notifications gets animated similar to the ones used by dialogs.
|
||||
Fixed so larger images that gets pasted is handled better.
|
||||
Fixed so the window close button is more uniform on various platform and also increased it's hit area.
|
||||
Version 4.3.5 (2016-02-11)
|
||||
Npm version bump due to package not being fully updated.
|
||||
Version 4.3.4 (2016-02-11)
|
||||
Added new OpenWindow/CloseWindow events that gets fired when windows open/close.
|
||||
Added new NewCell/NewRow events that gets fired when table cells/rows are created.
|
||||
Added new Promise return value to tinymce.init makes it easier to handle initialization.
|
||||
Removed the jQuery version the jQuery plugin is now moved into the main package.
|
||||
Removed jscs from build process since eslint can now handle code style checking.
|
||||
Fixed various bugs with drag/drop of contentEditable:false elements.
|
||||
Fixed bug where deleting of very specific nested list items would result in an odd list.
|
||||
Fixed bug where lists would get merged with adjacent lists outside the editable inline root.
|
||||
Fixed bug where MS Edge would crash when closing a dialog then clicking a menu item.
|
||||
Fixed bug where table cell selection would add undo levels.
|
||||
Fixed bug where table cell selection wasn't removed when inline editor where removed.
|
||||
Fixed bug where table cell selection wouldn't work properly on nested tables.
|
||||
Fixed bug where table merge menu would be available when merging between thead and tbody.
|
||||
Fixed bug where table row/column resize wouldn't get properly removed when the editor was removed.
|
||||
Fixed bug where Chrome would scroll to the editor if there where a empty hash value in document url.
|
||||
Fixed bug where the cache suffix wouldn't work correctly with the importcss plugin.
|
||||
Fixed bug where selection wouldn't work properly on MS Edge on Windows Phone 10.
|
||||
Fixed so adjacent pre blocks gets joined into one pre block since that seems like the user intent.
|
||||
Fixed so events gets properly dispatched in shadow dom. Patch provided by Nazar Mokrynskyi.
|
||||
Version 4.3.3 (2016-01-14)
|
||||
Added new table_resize_bars configuration setting. This setting allows you to disable the table resize bars.
|
||||
Added new beforeInitialize event to tinymce.util.XHR lets you modify XHR properties before open. Patch contributed by Brent Clintel.
|
||||
Added new autolink_pattern setting to autolink plugin. Enables you to override the default autolink formats. Patch contributed by Ben Tiedt.
|
||||
Added new charmap option that lets you override the default charmap of the charmap plugin.
|
||||
Added new charmap_append option that lets you add new characters to the default charmap of the charmap plugin.
|
||||
Added new insertCustomChar event that gets fired when a character is inserted by the charmap plugin.
|
||||
Fixed bug where table cells started with a superfluous in IE10+.
|
||||
Fixed bug where table plugin would retain all BR tags when cells were merged.
|
||||
Fixed bug where media plugin would strip underscores from youtube urls.
|
||||
Fixed bug where IME input would fail on IE 11 if you typed within a table.
|
||||
Fixed bug where double click selection of a word would remove the space before the word on insert contents.
|
||||
Fixed bug where table plugin would produce exceptions when hovering tables with invalid structure.
|
||||
Fixed bug where fullscreen wouldn't scroll back to it's original position when untoggled.
|
||||
Fixed so the template plugins templates setting can be a function that gets a callback that can provide templates.
|
||||
Version 4.3.2 (2015-12-14)
|
||||
Fixed bug where the resize bars for table cells were not affected by the object_resizing property.
|
||||
Fixed bug where the contextual table toolbar would appear incorrectly if TinyMCE was initialized inline inside a table.
|
||||
Fixed bug where resizing table cells did not fire a node change event or add an undo level.
|
||||
Fixed bug where double click selection of text on IE 11 wouldn't work properly.
|
||||
Fixed bug where codesample plugin would incorrectly produce br elements inside code elements.
|
||||
Fixed bug where media plugin would strip dashes from youtube urls.
|
||||
Fixed bug where it was possible to move the caret into the table resize bars.
|
||||
Fixed bug where drag/drop into a cE=false element was possible on IE.
|
||||
Version 4.3.1 (2015-11-30)
|
||||
Fixed so it's possible to disable the table inline toolbar by setting it to false or an empty string.
|
||||
Fixed bug where it wasn't possible to resize some tables using the drag handles.
|
||||
Fixed bug where unique id:s would clash for multiple editor instances and cE=false selections.
|
||||
Fixed bug where the same plugin could be initialized multiple times.
|
||||
Fixed bug where the table inline toolbars would be displayed at the same time as the image toolbars.
|
||||
Fixed bug where the table selection rect wouldn't be removed when selecting another control element.
|
||||
Version 4.3.0 (2015-11-23)
|
||||
Added new table column/row resize support. Makes it a lot more easy to resize the columns/rows in a table.
|
||||
Added new table inline toolbar. Makes it easier to for example add new rows or columns to a table.
|
||||
Added new notification API. Lets you display floating notifications to the end user.
|
||||
Added new codesample plugin that lets you insert syntax highlighted pre elements into the editor.
|
||||
Added new image_caption to images. Lets you create images with captions using a HTML5 figure/figcaption elements.
|
||||
Added new live previews of embeded videos. Lets you play the video right inside the editor.
|
||||
Added new setDirty method and "dirty" event to the editor. Makes it easier to track the dirty state change.
|
||||
Added new setMode method to Editor instances that lets you dynamically switch between design/readonly.
|
||||
Added new core support for contentEditable=false elements within the editor overrides the browsers broken behavior.
|
||||
Rewrote the noneditable plugin to use the new contentEditable false core logic.
|
||||
Fixed so the dirty state doesn't set to false automatically when the undo index is set to 0.
|
||||
Fixed the Selection.placeCaretAt so it works better on IE when the coordinate is between paragraphs.
|
||||
Fixed bug where data-mce-bogus="all" element contents where counted by the word count plugin.
|
||||
Fixed bug where contentEditable=false elements would be indented by the indent buttons.
|
||||
Fixed bug where images within contentEditable=false would be selected in WebKit on mouse click.
|
||||
Fixed bug in DOMUntils split method where the replacement parameter wouldn't work on specific cases.
|
||||
Fixed bug where the importcss plugin would import classes from the skin content css file.
|
||||
Fixed so all button variants have a wrapping span for it's text to make it easier to skin.
|
||||
Fixed so it's easier to exit pre block using the arrow keys.
|
||||
Fixed bug where listboxes with fix widths didn't render correctly.
|
||||
Version 4.2.8 (2015-11-13)
|
||||
Fixed bug where it was possible to delete tables as the inline root element if all columns where selected.
|
||||
Fixed bug where the UI buttons active state wasn't properly updated due to recent refactoring of that logic.
|
||||
Version 4.2.7 (2015-10-27)
|
||||
Fixed bug where backspace/delete would remove all formats on the last paragraph character in WebKit/Blink.
|
||||
Fixed bug where backspace within a inline format element with a bogus caret container would move the caret.
|
||||
Fixed bug where backspace/delete on selected table cells wouldn't add an undo level.
|
||||
Fixed bug where script tags embedded within the editor could sometimes get a mce- prefix prepended to them
|
||||
Fixed bug where validate: false option could produce an error to be thrown from the Serialization step.
|
||||
Fixed bug where inline editing of a table as the root element could let the user delete that table.
|
||||
Fixed bug where inline editing of a table as the root element wouldn't properly handle enter key.
|
||||
Fixed bug where inline editing of a table as the root element would normalize the selection incorrectly.
|
||||
Fixed bug where inline editing of a list as the root element could let the user delete that list.
|
||||
Fixed bug where inline editing of a list as the root element could let the user split that list.
|
||||
Fixed bug where resize handles would be rendered on editable root elements such as table.
|
||||
Version 4.2.6 (2015-09-28)
|
||||
Added capability to set request headers when using XHRs.
|
||||
Added capability to upload local images automatically default delay is set to 30 seconds after editing images.
|
||||
Added commands ids mceEditImage, mceAchor and mceMedia to be avaiable from execCommand.
|
||||
Added Edge browser to saucelabs grunt task. Patch contributed by John-David Dalton.
|
||||
Fixed bug where blob uris not produced by tinymce would produce HTML invalid markup.
|
||||
Fixed bug where selection of contents of a nearly empty editor in Edge would sometimes fail.
|
||||
Fixed bug where color styles woudln't be retained on copy/paste in Blink/Webkit.
|
||||
Fixed bug where the table plugin would throw an error when inserting rows after a child table.
|
||||
Fixed bug where the template plugin wouldn't handle functions as variable replacements.
|
||||
Fixed bug where undo/redo sometimes wouldn't work properly when applying formatting collapsed ranges.
|
||||
Fixed bug where shift+delete wouldn't do a cut operation on Blink/WebKit.
|
||||
Fixed bug where cut action wouldn't properly store the before selection bookmark for the undo level.
|
||||
Fixed bug where backspace in side an empty list element on IE would loose editor focus.
|
||||
Fixed bug where the save plugin wouldn't enable the buttons when a change occurred.
|
||||
Fixed bug where Edge wouldn't initialize the editor if a document.domain was specified.
|
||||
Fixed bug where enter key before nested images would sometimes not properly expand the previous block.
|
||||
Fixed bug where the inline toolbars wouldn't get properly hidden when blurring the editor instance.
|
||||
Fixed bug where Edge would paste Chinese characters on some Windows 10 installations.
|
||||
Fixed bug where IME would loose focus on IE 11 due to the double trailing br bug fix.
|
||||
Fixed bug where the proxy url in imagetools was incorrect. Patch contributed by Wong Ho Wang.
|
||||
Version 4.2.5 (2015-08-31)
|
||||
Added fullscreen capability to embedded youtube and vimeo videos.
|
||||
Fixed bug where the uploadImages call didn't work on IE 10.
|
||||
Fixed bug where image place holders would be uploaded by uploadImages call.
|
||||
Fixed bug where images marked with bogus would be uploaded by the uploadImages call.
|
||||
Fixed bug where multiple calls to uploadImages would result in decreased performance.
|
||||
Fixed bug where pagebreaks were editable to imagetools patch contributed by Rasmus Wallin.
|
||||
Fixed bug where the element path could cause too much recursion exception.
|
||||
Fixed bug for domains containing ".min". Patch contributed by Loïc Février.
|
||||
Fixed so validation of external links to accept a number after www. Patch contributed by Victor Carvalho.
|
||||
Fixed so the charmap is exposed though execCommand. Patch contributed by Matthew Will.
|
||||
Fixed so that the image uploads are concurrent for improved performance.
|
||||
Fixed various grammar problems in inline documentation. Patches provided by nikolas.
|
||||
Version 4.2.4 (2015-08-17)
|
||||
Added picture as a valid element to the HTML 5 schema. Patch contributed by Adam Taylor.
|
||||
Fixed bug where contents would be duplicated on drag/drop within the same editor.
|
||||
Fixed bug where floating/alignment of images on Edge wouldn't work properly.
|
||||
Fixed bug where it wasn't possible to drag images on IE 11.
|
||||
Fixed bug where image selection on Edge would sometimes fail.
|
||||
Fixed bug where contextual toolbars icons wasn't rendered properly when using the toolbar_items_size.
|
||||
Fixed bug where searchreplace dialog doesn't get prefilled with the selected text.
|
||||
Fixed bug where fragmented matches wouldn't get properly replaced by the searchreplace plugin.
|
||||
Fixed bug where enter key wouldn't place the caret if was after a trailing space within an inline element.
|
||||
Fixed bug where the autolink plugin could produce multiple links for the same text on Gecko.
|
||||
Fixed bug where EditorUpload could sometimes throw an exception if the blob wasn't found.
|
||||
Fixed xss issues with media plugin not properly filtering out some script attributes.
|
||||
Version 4.2.3 (2015-07-30)
|
||||
Fixed bug where image selection wasn't possible on Edge due to incompatible setBaseAndExtend API.
|
||||
Fixed bug where image blobs urls where not properly destroyed by the imagetools plugin.
|
||||
Fixed bug where keyboard shortcuts wasn't working correctly on IE 8.
|
||||
Fixed skin issue where the borders of panels where not visible on IE 8.
|
||||
Version 4.2.2 (2015-07-22)
|
||||
Fixed bug where float panels were not being hidden on inline editor blur when fixed_toolbar_container config option was in use.
|
||||
Fixed bug where combobox states wasn't properly updated if contents where updated without keyboard.
|
||||
Fixed bug where pasting into textbox or combobox would move the caret to the end of text.
|
||||
Fixed bug where removal of bogus span elements before block elements would remove whitespace between nodes.
|
||||
Fixed bug where repositioning of inline toolbars where async and producing errors if the editor was removed from DOM to early. Patch by iseulde.
|
||||
Fixed bug where element path wasn't working correctly. Patch contributed by iseulde.
|
||||
Fixed bug where menus wasn't rendered correctly when custom images where added to a menu. Patch contributed by Naim Hammadi.
|
||||
Version 4.2.1 (2015-06-29)
|
||||
Fixed bug where back/forward buttons in the browser would render blob images as broken images.
|
||||
Fixed bug where Firefox would throw regexp to big error when replacing huge base64 chunks.
|
||||
Fixed bug rendering issues with resize and context toolbars not being placed properly until next animation frame.
|
||||
Fixed bug where the rendering of the image while cropping would some times not be centered correctly.
|
||||
Fixed bug where listbox items with submenus would me selected as active.
|
||||
Fixed bug where context menu where throwing an error when rendering.
|
||||
Fixed bug where resize both option wasn't working due to resent addClass API change. Patch contributed by Jogai.
|
||||
Fixed bug where a hideAll call for container rendered inline toolbars would throw an error.
|
||||
Fixed bug where onclick event handler on combobox could cause issues if element.id was a function by some polluting libraries.
|
||||
Fixed bug where listboxes wouldn't get proper selected sub menu item when using link_list or image_list.
|
||||
Fixed so the UI controls are as wide as 4.1.x to avoid wrapping controls in toolbars.
|
||||
Fixed so the imagetools dialog is adaptive for smaller screen sizes.
|
||||
Version 4.2.0 (2015-06-25)
|
||||
Added new flat default skin to make the UI more modern.
|
||||
Added new imagetools plugin, lets you crop/resize and apply filters to images.
|
||||
Added new contextual toolbars support to the API lets you add floating toolbars for specific CSS selectors.
|
||||
Added new promise feature fill as tinymce.util.Promise.
|
||||
Added new built in image upload feature lets you upload any base64 encoded image within the editor as files.
|
||||
Fixed bug where resize handles would appear in the right position in the wrong editor when switching between resizable content in different inline editors.
|
||||
Fixed bug where tables would not be inserted in inline mode due to previous float panel fix.
|
||||
Fixed bug where floating panels would remain open when focus was lost on inline editors.
|
||||
Fixed bug where cut command on Chrome would thrown a browser security exception.
|
||||
Fixed bug where IE 11 sometimes would report an incorrect size for images in the image dialog.
|
||||
Fixed bug where it wasn't possible to remove inline formatting at the end of block elements.
|
||||
Fixed bug where it wasn't possible to delete table cell contents when cell selection was vertical.
|
||||
Fixed bug where table cell wasn't emptied from block elements if delete/backspace where pressed in empty cell.
|
||||
Fixed bug where cmd+shift+arrow didn't work correctly on Firefox mac when selecting to start/end of line.
|
||||
Fixed bug where removal of bogus elements would sometimes remove whitespace between nodes.
|
||||
Fixed bug where the resize handles wasn't updated when the main window was resized.
|
||||
Fixed so script elements gets removed by default to prevent possible XSS issues in default config implementations.
|
||||
Fixed so the UI doesn't need manual reflows when using non native layout managers.
|
||||
Fixed so base64 encoded images doesn't slow down the editor on modern browsers while editing.
|
||||
Fixed so all UI elements uses touch events to improve mobile device support.
|
||||
Removed the touch click quirks patch for iOS since it did more harm than good.
|
||||
Removed the non proportional resize handles since. Unproportional resize can still be done by holding the shift key.
|
||||
Version 4.1.10 (2015-05-05)
|
||||
Fixed bug where plugins loaded with compat3x would sometimes throw errors when loading using the jQuery version.
|
||||
Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix.
|
||||
Fixed bug where the editor wouldn't work properly on IE 12 due to some required browser sniffing.
|
||||
Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys.
|
||||
Fixed bug where the caret wouldn't move to the next/previous line boundary on Cmd+Left/Right on Gecko.
|
||||
Fixed bug where it wasn't possible to remove formats from very specific nested contents.
|
||||
Fixed bug where undo levels wasn't produced when typing letters using the shift or alt+ctrl modifiers.
|
||||
Fixed bug where the dirty state wasn't properly updated when typing using the shift or alt+ctrl modifiers.
|
||||
Fixed bug where an error would be thrown if an autofocused editor was destroyed quickly after its initialization. Patch provided by thorn0.
|
||||
Fixed issue with dirty state not being properly updated on redo operation.
|
||||
Fixed issue with entity decoder not handling incorrectly written numeric entities.
|
||||
Fixed issue where some PI element values wouldn't be properly encoded.
|
||||
Version 4.1.9 (2015-03-10)
|
||||
Fixed bug where indentation wouldn't work properly for non list elements.
|
||||
Fixed bug with image plugin not pulling the image dimensions out correctly if a custom document_base_url was used.
|
||||
Fixed bug where ctrl+alt+[1-9] would conflict with the AltGr+[1-9] on Windows. New shortcuts is ctrl+shift+[1-9].
|
||||
Fixed bug with removing formatting on nodes in inline mode would sometimes include nodes outside the editor body.
|
||||
Fixed bug where extra nbsp:s would be inserted when you replaced a word surrounded by spaces using insertContent.
|
||||
Fixed bug with pasting from Google Docs would produce extra strong elements and line feeds.
|
||||
Version 4.1.8 (2015-03-05)
|
||||
Added new html5 sizes attribute to img elements used together with srcset.
|
||||
Added new elementpath option that makes it possible to disable the element path but keep the statusbar.
|
||||
Added new option table_style_by_css for the table plugin to set table styling with css rather than table attributes.
|
||||
Added new link_assume_external_targets option to prompt the user to prepend http:// prefix if the supplied link does not contain a protocol prefix.
|
||||
Added new image_prepend_url option to allow a custom base path/url to be added to images.
|
||||
Added new table_appearance_options option to make it possible to disable some options.
|
||||
Added new image_title option to make it possible to alter the title of the image, disabled by default.
|
||||
Fixed bug where selection starting from out side of the body wouldn't produce a proper selection range on IE 11.
|
||||
Fixed bug where pressing enter twice before a table moves the cursor in the table and causes a javascript error.
|
||||
Fixed bug where advanced image styles were not respected.
|
||||
Fixed bug where the less common Shift+Delete didn't produce a proper cut operation on WebKit browsers.
|
||||
Fixed bug where image/media size constrain logic would produce NaN when handling non number values.
|
||||
Fixed bug where internal classes where removed by the removeformat command.
|
||||
Fixed bug with creating links table cell contents with a specific selection would throw a exceptions on WebKit/Blink.
|
||||
Fixed bug where valid_classes option didn't work as expected according to docs. Patch provided by thorn0.
|
||||
Fixed bug where jQuery plugin would patch the internal methods multiple times. Patch provided by Drew Martin.
|
||||
Fixed bug where backspace key wouldn't delete the current selection of newly formatted content.
|
||||
Fixed bug where type over of inline formatting elements wouldn't properly keep the format on WebKit/Blink.
|
||||
Fixed bug where selection needed to be properly normalized on modern IE versions.
|
||||
Fixed bug where Command+Backspace didn't properly delete the whole line of text but the previous word.
|
||||
Fixed bug where UI active states wheren't properly updated on IE if you placed caret within the current range.
|
||||
Fixed bug where delete/backspace on WebKit/Blink would remove span elements created by the user.
|
||||
Fixed bug where delete/backspace would produce incorrect results when deleting between two text blocks with br elements.
|
||||
Fixed bug where captions where removed when pasting from MS Office.
|
||||
Fixed bug where lists plugin wouldn't properly remove fully selected nested lists.
|
||||
Fixed bug where the ttf font used for icons would throw an warning message on Gecko on Mac OS X.
|
||||
Fixed a bug where applying a color to text did not update the undo/redo history.
|
||||
Fixed so shy entities gets displayed when using the visualchars plugin.
|
||||
Fixed so removeformat removes ins/del by default since these might be used for strikethough.
|
||||
Fixed so multiple language packs can be loaded and added to the global I18n data structure.
|
||||
Fixed so transparent color selection gets treated as a normal color selection. Patch contributed by Alexander Hofbauer.
|
||||
Fixed so it's possible to disable autoresize_overflow_padding, autoresize_bottom_margin options by setting them to false.
|
||||
Fixed so the charmap plugin shows the description of the character in the dialog. Patch contributed by Jelle Hissink.
|
||||
Removed address from the default list of block formats since it tends to be missused.
|
||||
Fixed so the pre block format is called preformatted to make it more verbose.
|
||||
Fixed so it's possible to context scope translation strings this isn't needed most of the time.
|
||||
Fixed so the max length of the width/height input fields of the media dialog is 5 instead of 3.
|
||||
Fixed so drag/dropped contents gets properly processed by paste plugin since it's basically a paste. Patch contributed by Greg Fairbanks.
|
||||
Fixed so shortcut keys for headers is ctrl+alt+[1-9] instead of ctrl+[1-9] since these are for switching tabs in the browsers.
|
||||
Fixed so "u" doesn't get converted into a span element by the legacy input filter. Since this is now a valid HTML5 element.
|
||||
Fixed font families in order to provide appropriate web-safe fonts.
|
||||
Version 4.1.7 (2014-11-27)
|
||||
Added HTML5 schema support for srcset, source and picture. Patch contributed by mattheu.
|
||||
Added new cache_suffix setting to enable cache busting by producing unique urls.
|
||||
Added new paste_convert_word_fake_lists option to enable users to disable the fake lists convert logic.
|
||||
Fixed so advlist style changes adds undo levels for each change.
|
||||
Fixed bug where WebKit would sometimes produce an exception when the autolink plugin where looking for URLs.
|
||||
Fixed bug where IE 7 wouldn't be rendered properly due to aggressive css compression.
|
||||
Fixed bug where DomQuery wouldn't accept window as constructor element.
|
||||
Fixed bug where the color picker in 3.x dialogs wouldn't work properly. Patch contributed by Callidior.
|
||||
Fixed bug where the image plugin wouldn't respect the document_base_url.
|
||||
Fixed bug where the jQuery plugin would fail to append to elements named array prototype names.
|
||||
Version 4.1.6 (2014-10-08)
|
||||
Fixed bug with clicking on the scrollbar of the iframe would cause a JS error to be thrown.
|
||||
Fixed bug where null would produce an exception if you passed it to selection.setRng.
|
||||
Fixed bug where Ctrl/Cmd+Tab would indent the current list item if you switched tabs in the browser.
|
||||
Fixed bug where pasting empty cells from Excel would result in a broken table.
|
||||
Fixed bug where it wasn't possible to switch back to default list style type.
|
||||
Fixed issue where the select all quirk fix would fire for other modifiers than Ctrl/Cmd combinations.
|
||||
Replaced jake with grunt since it is more mainstream and has better plugin support.
|
||||
Version 4.1.5 (2014-09-09)
|
||||
Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink.
|
||||
Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly.
|
||||
Fixed bug where empty list elements would result in empty LI elements without it's parent container.
|
||||
Fixed bug where backspace in empty caret formatted element could produce an type error exception of Gecko.
|
||||
Fixed bug where lists pasted from word with a custom start index above 9 wouldn't be properly handled.
|
||||
Fixed bug where tabfocus plugin would tab out of the editor instance even if the default action was prevented.
|
||||
Fixed bug where tabfocus wouldn't tab properly to other adjacent editor instances.
|
||||
Fixed bug where the DOMUtils setStyles wouldn't properly removed or update the data-mce-style attribute.
|
||||
Fixed bug where dialog select boxes would be placed incorrectly if document.body wasn't statically positioned.
|
||||
Fixed bug where pasting would sometimes scroll to the top of page if the user was using the autoresize plugin.
|
||||
Fixed bug where caret wouldn't be properly rendered by Chrome when clicking on the iframes documentElement.
|
||||
Fixed so custom images for menubutton/splitbutton can be provided. Patch contributed by Naim Hammadi.
|
||||
Fixed so the default action of windows closing can be prevented by blocking the default action of the close event.
|
||||
Fixed so nodeChange and focus of the editor isn't automatically performed when opening sub dialogs.
|
||||
Version 4.1.4 (2014-08-21)
|
||||
Added new media_filter_html option to media plugin that blocks any conditional comments, scripts etc within a video element.
|
||||
Added new content_security_policy option allows you to set custom policy for iframe contents. Patch contributed by Francois Chagnon.
|
||||
Fixed bug where activate/deactivate events wasn't firing properly when switching between editors.
|
||||
Fixed bug where placing the caret on iOS was difficult due to a WebKit bug with touch events.
|
||||
Fixed bug where the resize helper wouldn't render properly on older IE versions.
|
||||
Fixed bug where resizing images inside tables on older IE versions would sometimes fail depending mouse position.
|
||||
Fixed bug where editor.insertContent would produce an exception when inserting select/option elements.
|
||||
Fixed bug where extra empty paragraphs would be produced if block elements where inserted inside span elements.
|
||||
Fixed bug where the spellchecker menu item wouldn't be properly checked if spell checking was started before it was rendered.
|
||||
Fixed bug where the DomQuery filter function wouldn't remove non elements from collection.
|
||||
Fixed bug where document with custom document.domain wouldn't properly render the editor.
|
||||
Fixed bug where IE 8 would throw exception when trying to enter invalid color values into colorboxes.
|
||||
Fixed bug where undo manager could incorrectly add an extra undo level when custom resize handles was removed.
|
||||
Fixed bug where it wouldn't be possible to alter cell properties properly on table cells on IE 8.
|
||||
Fixed so the color picker button in table dialog isn't shown unless you include the colorpicker plugin or add your own custom color picker.
|
||||
Fixed so activate/deactivate events fire when windowManager opens a window since.
|
||||
Fixed so the table advtab options isn't separated by an underscore to normalize naming with image_advtab option.
|
||||
Fixed so the table cell dialog has proper padding when the advanced tab in disabled.
|
||||
Version 4.1.3 (2014-07-29)
|
||||
Added event binding logic to tinymce.util.XHR making it possible to override headers and settings before any request is made.
|
||||
Fixed bug where drag events wasn't fireing properly on older IE versions since the event handlers where bound to document.
|
||||
Fixed bug where drag/dropping contents within the editor on IE would force the contents into plain text mode even if it was internal content.
|
||||
Fixed bug where IE 7 wouldn't open menus properly due to a resize bug in the browser auto closing them immediately.
|
||||
Fixed bug where the DOMUtils getPos logic wouldn't produce a valid coordinate inside the body if the body was positioned non static.
|
||||
Fixed bug where the element path and format state wasn't properly updated if you had the wordcount plugin enabled.
|
||||
Fixed bug where a comment at the beginning of source would produce an exception in the formatter logic.
|
||||
Fixed bug where setAttrib/getAttrib on null would throw exception together with any hooked attributes like style.
|
||||
Fixed bug where table sizes wasn't properly retained when copy/pasting on WebKit/Blink.
|
||||
Fixed bug where WebKit/Blink would produce colors in RGB format instead of the forced HEX format when deleting contents.
|
||||
Fixed bug where the width attribute wasn't updated on tables if you changed the size inside the table dialog.
|
||||
Fixed bug where control selection wasn't properly handled when the caret was placed directly after an image.
|
||||
Fixed bug where selecting the contents of table cells using the selection.select method wouldn't place the caret properly.
|
||||
Fixed bug where the selection state for images wasn't removed when placing the caret right after an image on WebKit/Blink.
|
||||
Fixed bug where all events wasn't properly unbound when and editor instance was removed or destroyed by some external innerHTML call.
|
||||
Fixed bug where it wasn't possible or very hard to select images on iOS when the onscreen keyboard was visible.
|
||||
Fixed so auto_focus can take a boolean argument this will auto focus the last initialized editor might be useful for single inits.
|
||||
Fixed so word auto detect lists logic works better for faked lists that doesn't have specific markup.
|
||||
Fixed so nodeChange gets fired on mouseup as it used to before 4.1.1 we optimized that event to fire less often.
|
||||
Removed the finish menu item from spellchecker menu since it's redundant you can stop spellchecking by toggling menu item or button.
|
||||
Version 4.1.2 (2014-07-15)
|
||||
Added offset/grep to DomQuery class works basically the same as it's jQuery equivalent.
|
||||
Fixed bug where backspace/delete or setContent with an empty string would remove header data when using the fullpage plugin.
|
||||
Fixed bug where tinymce.remove with a selector not matching any editors would remove all editors.
|
||||
Fixed bug where resizing of the editor didn't work since the theme was calling setStyles instead of setStyle.
|
||||
Fixed bug where IE 7 would fail to append html fragments to iframe document when using DomQuery.
|
||||
Fixed bug where the getStyle DOMUtils method would produce an exception if it was called with null as it's element.
|
||||
Fixed bug where the paste plugin would remove the element if the none of the paste_webkit_styles rules matched the current style.
|
||||
Fixed bug where contextmenu table items wouldn't work properly on IE since it would some times fire an incorrect selection change.
|
||||
Fixed bug where the padding/border values wasn't used in the size calculation for the body size when using autoresize. Patch contributed by Matt Whelan.
|
||||
Fixed bug where conditional word comments wouldn't be properly removed when pasting plain text.
|
||||
Fixed bug where resizing would sometime fail on IE 11 when the mouseup occurred inside the resizable element.
|
||||
Fixed so the iframe gets initialized without any inline event handlers for better CSP support. Patch contributed by Matt Whelan.
|
||||
Fixed so the tinymce.dom.Sizzle is the latest version of sizzle this resolves the document context bug.
|
||||
Version 4.1.1 (2014-07-08)
|
||||
Fixed bug where pasting plain text on some WebKit versions would result in an empty line.
|
||||
Fixed bug where resizing images inside tables on IE 11 wouldn't work properly.
|
||||
Fixed bug where IE 11 would sometimes throw "Invalid argument" exception when editor contents was set to an empty string.
|
||||
Fixed bug where document.activeElement would throw exceptions on IE 9 when that element was hidden or removed from dom.
|
||||
Fixed bug where WebKit/Blink sometimes produced br elements with the Apple-interchange-newline class.
|
||||
Fixed bug where table cell selection wasn't properly removed when copy/pasting table cells.
|
||||
Fixed bug where pasting nested list items from Word wouldn't produce proper semantic nested lists.
|
||||
Fixed bug where right clicking using the contextmenu plugin on WebKit/Blink on Mac OS X would select the target current word or line.
|
||||
Fixed bug where it wasn't possible to alter table cell properties on IE 8 using the context menu.
|
||||
Fixed bug where the resize helper wouldn't be correctly positioned on older IE versions.
|
||||
Fixed bug where fullpage plugin would produce an error if you didn't specify a doctype encoding.
|
||||
Fixed bug where anchor plugin would get the name/id of the current element even if it wasn't anchor element.
|
||||
Fixed bug where visual aids for tables wouldn't be properly disabled when changing the border size.
|
||||
Fixed bug where some control selection events wasn't properly fired on older IE versions.
|
||||
Fixed bug where table cell selection on older IE versions would prevent resizing of images.
|
||||
Fixed bug with paste_data_images paste option not working properly on modern IE versions.
|
||||
Fixed bug where custom elements with underscores in the name wasn't properly parsed/serialized.
|
||||
Fixed bug where applying inline formats to nested list elements would produce an incorrect formatting result.
|
||||
Fixed so it's possible to hide items from elements path by using preventDefault/stopPropagation.
|
||||
Fixed so inline mode toolbar gets rendered right aligned if the editable element positioned to the documents right edge.
|
||||
Fixed so empty inline elements inside empty block elements doesn't get removed if configured to be kept intact.
|
||||
Fixed so DomQuery parentsUntil/prevUntil/nextUntil supports selectors/elements/filters etc.
|
||||
Fixed so legacyoutput plugin overrides fontselect and fontsizeselect controls and handles font elements properly.
|
||||
Version 4.1.0 (2014-06-18)
|
||||
Added new file_picker_callback option to replace the old file_browser_callback the latter will still work though.
|
||||
Added new custom colors to textcolor plugin will be displayed if a color picker is provided also shows the latest colors.
|
||||
Added new color_picker_callback option to enable you to add custom color pickers to the editor.
|
||||
Added new advanced tabs to table/cell/row dialogs to enable you to select colors for border/background.
|
||||
Added new colorpicker plugin that lets you select colors from a hsv color picker.
|
||||
Added new tinymce.util.Color class to handle color parsing and converting.
|
||||
Added new colorpicker UI widget element lets you add a hsv color picker to any form/window.
|
||||
Added new textpattern plugin that allows you to use markdown like text patterns to format contents.
|
||||
Added new resize helper element that shows the current width & height while resizing.
|
||||
Added new "once" method to Editor and EventDispatcher enables since callback execution events.
|
||||
Added new jQuery like class under tinymce.dom.DomQuery it's exposed on editor instances (editor.$) and globally under (tinymce.$).
|
||||
Fixed so the default resize method for images are proportional shift/ctrl can be used to make an unproportional size.
|
||||
Fixed bug where the image_dimensions option of the image plugin would cause exceptions when it tried to update the size.
|
||||
Fixed bug where table cell dialog class field wasn't properly updated when editing an a table cell with an existing class.
|
||||
Fixed bug where Safari on Mac would produce webkit-fake-url for pasted images so these are now removed.
|
||||
Fixed bug where the nodeChange event would get fired before the selection was changed when clicking inside the current selection range.
|
||||
Fixed bug where valid_classes option would cause exception when it removed internal prefixed classes like mce-item-.
|
||||
Fixed bug where backspace would cause navigation in IE 8 on an inline element and after a caret formatting was applied.
|
||||
Fixed so placeholder images produced by the media plugin gets selected when inserted/edited.
|
||||
Fixed so it's possible to drag in images when the paste_data_images option is enabled. Might be useful for mail clients.
|
||||
Fixed so images doesn't get a width/height applied if the image_dimensions option is set to false useful for responsive contents.
|
||||
Fixed so it's possible to pass in an optional arguments object for the nodeChanged function to be passed to all nodechange event listeners.
|
||||
Fixed bug where media plugin embed code didn't update correctly.
|
||||
@@ -0,0 +1 @@
|
||||
!function(){var f,c,u,p,d,s=[];d="undefined"!=typeof global?global:window,p=d.jQuery;var v=function(){return d.tinymce};p.fn.tinymce=function(o){var e,t,i,l=this,r="";if(!l.length)return l;if(!o)return v()?v().get(l[0].id):null;l.css("visibility","hidden");var n=function(){var a=[],c=0;u||(m(),u=!0),l.each(function(e,t){var n,i=t.id,r=o.oninit;i||(t.id=i=v().DOM.uniqueId()),v().get(i)||(n=v().createEditor(i,o),a.push(n),n.on("init",function(){var e,t=r;l.css("visibility",""),r&&++c==a.length&&("string"==typeof t&&(e=-1===t.indexOf(".")?null:v().resolve(t.replace(/\.\w+$/,"")),t=v().resolve(t)),t.apply(e||v(),a))}))}),p.each(a,function(e,t){t.render()})};if(d.tinymce||c||!(e=o.script_url))1===c?s.push(n):n();else{c=1,t=e.substring(0,e.lastIndexOf("/")),-1!=e.indexOf(".min")&&(r=".min"),d.tinymce=d.tinyMCEPreInit||{base:t,suffix:r},-1!=e.indexOf("gzip")&&(i=o.language||"en",e=e+(/\?/.test(e)?"&":"?")+"js=true&core=true&suffix="+escape(r)+"&themes="+escape(o.theme||"modern")+"&plugins="+escape(o.plugins||"")+"&languages="+(i||""),d.tinyMCE_GZ||(d.tinyMCE_GZ={start:function(){var n=function(e){v().ScriptLoader.markDone(v().baseURI.toAbsolute(e))};n("langs/"+i+".js"),n("themes/"+o.theme+"/theme"+r+".js"),n("themes/"+o.theme+"/langs/"+i+".js"),p.each(o.plugins.split(","),function(e,t){t&&(n("plugins/"+t+"/plugin"+r+".js"),n("plugins/"+t+"/langs/"+i+".js"))})},end:function(){}}));var a=document.createElement("script");a.type="text/javascript",a.onload=a.onreadystatechange=function(e){e=e||window.event,2===c||"load"!=e.type&&!/complete|loaded/.test(a.readyState)||(v().dom.Event.domLoaded=1,c=2,o.script_loaded&&o.script_loaded(),n(),p.each(s,function(e,t){t()}))},a.src=e,document.body.appendChild(a)}return l},p.extend(p.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in d&&(t=v().get(e.id))&&t.editorManager===v())}});var m=function(){var r=function(e){"remove"===e&&this.each(function(e,t){var n=l(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=v().get(t.id.replace(/_parent$/,""));n&&n.remove()})},o=function(i){var e,t=this;if(null!=i)r.call(t),t.each(function(e,t){var n;(n=v().get(t.id))&&n.setContent(i)});else if(0<t.length&&(e=v().get(t[0].id)))return e.getContent()},l=function(e){var t=null;return e&&e.id&&d.tinymce&&(t=v().get(e.id)),t},u=function(e){return!!(e&&e.length&&d.tinymce&&e.is(":tinymce"))},s={};p.each(["text","html","val"],function(e,t){var a=s[t]=p.fn[t],c="text"===t;p.fn[t]=function(e){var t=this;if(!u(t))return a.apply(t,arguments);if(e!==f)return o.call(t.filter(":tinymce"),e),a.apply(t.not(":tinymce"),arguments),t;var i="",r=arguments;return(c?t:t.eq(0)).each(function(e,t){var n=l(t);i+=n?c?n.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):n.getContent({save:!0}):a.apply(p(t),r)}),i}}),p.each(["append","prepend"],function(e,t){var n=s[t]=p.fn[t],r="prepend"===t;p.fn[t]=function(i){var e=this;return u(e)?i!==f?("string"==typeof i&&e.filter(":tinymce").each(function(e,t){var n=l(t);n&&n.setContent(r?i+n.getContent():n.getContent()+i)}),n.apply(e.not(":tinymce"),arguments),e):void 0:n.apply(e,arguments)}}),p.each(["remove","replaceWith","replaceAll","empty"],function(e,t){var n=s[t]=p.fn[t];p.fn[t]=function(){return r.call(this,t),n.apply(this,arguments)}}),s.attr=p.fn.attr,p.fn.attr=function(e,t){var n=this,i=arguments;if(!e||"value"!==e||!u(n))return s.attr.apply(n,i);if(t!==f)return o.call(n.filter(":tinymce"),t),s.attr.apply(n.not(":tinymce"),i),n;var r=n[0],a=l(r);return a?a.getContent({save:!0}):s.attr.apply(p(r),i)}}}();
|
||||
@@ -0,0 +1,3 @@
|
||||
This is where language files should be placed.
|
||||
|
||||
Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/
|
||||
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e,n){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===n?null:{"list-style-type":n})},o=function(n){n.addCommand("ApplyUnorderedListStyle",function(t,e){s(n,"UL",e["list-style-type"])}),n.addCommand("ApplyOrderedListStyle",function(t,e){s(n,"OL",e["list-style-type"])})},e=function(t){var e=t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return e?e.split(/[ ,]/):[]},n=function(t){var e=t.getParam("advlist_bullet_styles","default,circle,disc,square");return e?e.split(/[ ,]/):[]},u=function(t){return t&&/^(TH|TD)$/.test(t.nodeName)},c=function(r){return function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&(n=t,(e=r).$.contains(e.getBody(),n));var e,n}},d=function(t){var e=t.dom.getParent(t.selection.getNode(),"ol,ul");return t.dom.getStyle(e,"listStyleType")||""},p=function(t){return a.map(t,function(t){return{text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),data:"default"===t?"":t}})},f=function(i,l){return function(t){var o=t.control;i.on("NodeChange",function(t){var e=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}(t.parents,u),n=-1!==e?t.parents.slice(0,e):t.parents,r=a.grep(n,c(i));o.active(0<r.length&&r[0].nodeName===l)})}},m=function(e,t,n,r,o,i){var l;e.addButton(t,{active:!1,type:"splitbutton",tooltip:n,menu:p(i),onPostRender:f(e,o),onshow:(l=e,function(t){var e=d(l);t.control.items().each(function(t){t.active(t.settings.data===e)})}),onselect:function(t){s(e,o,t.control.settings.data)},onclick:function(){e.execCommand(r)}})},r=function(t,e,n,r,o,i){var l,a,s,u,c;0<i.length?m(t,e,n,r,o,i):(a=e,s=n,u=r,c=o,(l=t).addButton(a,{active:!1,type:"button",tooltip:s,onPostRender:f(l,c),onclick:function(){l.execCommand(u)}}))},i=function(t){r(t,"numlist","Numbered list","InsertOrderedList","OL",e(t)),r(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))};t.add("advlist",function(t){var e,n,r;n="lists",r=(e=t).settings.plugins?e.settings.plugins:"",-1!==a.inArray(r.split(/[ ,]/),n)&&(i(t),o(t))})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},e=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.id||e.name:""},i=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},n=function(r){var t=e(r);r.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:t},onsubmit:function(t){var e,n,o=t.data.id;e=r,(a(n=o)?(i(e,n),0):(e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))&&t.preventDefault()}})},o=function(t){t.addCommand("mceAnchor",function(){n(t)})},r=function(o){return function(t){for(var e=0;e<t.length;e++)(n=t[e]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||t[e].attr("contenteditable",o);var n}},c=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",r("false")),t.serializer.addNodeFilter("a",r(null))})},d=function(t){t.addButton("anchor",{icon:"anchor",tooltip:"Anchor",cmd:"mceAnchor",stateSelector:"a:not([href])"}),t.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",cmd:"mceAnchor"})};t.add("anchor",function(t){c(t),o(t),d(t)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),m=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},y=function(e){return e.getParam("default_link_target","")},o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;n<t&&(t=n)}return t},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},p=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},r=function(e,t,n){var i,o,r,a,f,s,d,l,c,u,g=m(e),h=y(e);if("A"!==e.selection.getNode().tagName){if((i=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(l=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;l=i.endContainer.firstChild.nextSibling}if(c=l.length,k(i,l,c),p(i,l,c),i.endOffset<5)return;o=i.endOffset,a=l}else{if(3!==(a=i.endContainer).nodeType&&a.firstChild){for(;3!==a.nodeType&&a.firstChild;)a=a.firstChild;3===a.nodeType&&(k(i,a,0),p(i,a,a.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-t}for(r=o;k(i,a,2<=o?o-2:0),p(i,a,1<=o?o-1:0),o-=1," "!==(u=i.toString())&&""!==u&&160!==u.charCodeAt(0)&&0<=o-2&&u!==n;);var C;(C=i.toString())===n||" "===C||160===C.charCodeAt(0)?(k(i,a,o),p(i,a,r),o+=1):(0===i.startOffset?k(i,a,0):k(i,a,o),p(i,a,r)),"."===(s=i.toString()).charAt(s.length-1)&&p(i,a,r-1),(d=(s=i.toString().trim()).match(g))&&("www."===d[1]?d[1]="http://www.":/@$/.test(d[1])&&!/^mailto:/.test(d[1])&&(d[1]="mailto:"+d[1]),f=e.selection.getBookmark(),e.selection.setRng(i),e.execCommand("createlink",!1,d[1]+d[2]),h&&e.dom.setAttrib(e.selection.getNode(),"target",h),e.selection.moveToBookmark(f),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),i.ie?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var i=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return i(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),y=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),h=function(t){return parseInt(t.getParam("autoresize_min_height",t.getElement().offsetHeight),10)},v=function(t){return parseInt(t.getParam("autoresize_max_height",0),10)},o=function(t){return t.getParam("autoresize_overflow_padding",1)},a=function(t){return t.getParam("autoresize_bottom_margin",50)},n=function(t){return t.getParam("autoresize_on_init",!0)},u=function(t,e,n,i,o){r.setEditorTimeout(t,function(){_(t,e),n--?u(t,e,n,i,o):o&&o()},i)},S=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},_=function(t,e){var n,i,o,r,a,u,s,l,g,c,f,d=t.dom;if(i=t.getDoc())if((m=t).plugins.fullscreen&&m.plugins.fullscreen.isFullscreen())S(t,!0);else{var m;o=i.body,r=h(t),u=d.getStyle(o,"margin-top",!0),s=d.getStyle(o,"margin-bottom",!0),l=d.getStyle(o,"padding-top",!0),g=d.getStyle(o,"padding-bottom",!0),c=d.getStyle(o,"border-top-width",!0),f=d.getStyle(o,"border-bottom-width",!0),a=o.offsetHeight+parseInt(u,10)+parseInt(s,10)+parseInt(l,10)+parseInt(g,10)+parseInt(c,10)+parseInt(f,10),(isNaN(a)||a<=0)&&(a=y.ie?o.scrollHeight:y.webkit&&0===o.clientHeight?0:o.offsetHeight),a>h(t)&&(r=a);var p=v(t);p&&p<a?(r=p,S(t,!0)):S(t,!1),r!==e.get()&&(n=r-e.get(),d.setStyle(t.iframeElement,"height",r+"px"),e.set(r),y.webkit&&n<0&&_(t,e))}},s={setup:function(i,e){i.on("init",function(){var t,e,n=i.dom;t=o(i),e=a(i),!1!==t&&n.setStyles(i.getBody(),{paddingLeft:t,paddingRight:t}),!1!==e&&n.setStyles(i.getBody(),{paddingBottom:e})}),i.on("nodechange setcontent keyup FullscreenStateChanged",function(t){_(i,e)}),n(i)&&i.on("init",function(){u(i,e,20,100,function(){u(i,e,5,1e3)})})},resize:_},l=function(t,e){t.addCommand("mceAutoResize",function(){s.resize(t,e)})};t.add("autoresize",function(t){if(!t.inline){var e=i(0);l(t,e),s.setup(t,e)}})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=function(t){var e=t,r=function(){return e};return{get:r,set:function(t){e=t},clone:function(){return n(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(t){return t.fire("RestoreDraft")},i=function(t){return t.fire("StoreDraft")},s=function(t){return t.fire("RemoveDraft")},e=function(t,e){return((t=/^(\d+)([ms]?)$/.exec(""+(t||e)))[2]?{s:1e3,m:6e4}[t[2]]:1)*parseInt(t,10)},u=function(t){return t.getParam("autosave_ask_before_unload",!0)},f=function(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,document.location.pathname)).replace(/\{query\}/g,document.location.search)).replace(/\{hash\}/g,document.location.hash)).replace(/\{id\}/g,t.id)},c=function(t){return e(t.settings.autosave_interval,"30s")},l=function(t){return e(t.settings.autosave_retention,"20m")},m=function(t,e){var r=t.settings.forced_root_block;return""===(e=o.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+r+"[^>]*>((\xa0| |[ \t]|<br[^>]*>)+?|)</"+r+">|<br>$","i").test(e)},v=function(t){var e=parseInt(a.getItem(f(t)+"time"),10)||0;return!((new Date).getTime()-e>l(t)&&(d(t,!1),1))},d=function(t,e){var r=f(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&s(t)},D=function(t){var e=f(t);!m(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),i(t))},g=function(t){var e=f(t);v(t)&&(t.setContent(a.getItem(e+"draft"),{format:"raw"}),r(t))},y={isEmpty:m,hasDraft:v,removeDraft:d,storeDraft:D,restoreDraft:g,startStoreDraft:function(t,e){var r=c(t);e.get()||(setInterval(function(){t.removed||D(t)},r),e.set(!0))},restoreLastDraft:function(t){t.undoManager.transact(function(){g(t),d(t)}),t.focus()}},p=function(e,r){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r].concat(t))}},h=function(t){return{hasDraft:p(y.hasDraft,t),storeDraft:p(y.storeDraft,t),restoreDraft:p(y.restoreDraft,t),removeDraft:p(y.removeDraft,t),isEmpty:p(y.isEmpty,t)}},_=tinymce.util.Tools.resolve("tinymce.EditorManager");_._beforeUnloadHandler=function(){var e;return o.each(_.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e};var b=function(t){window.onbeforeunload=_._beforeUnloadHandler},I=function(r,n){return function(t){var e=t.control;e.disabled(!y.hasDraft(r)),r.on("StoreDraft RestoreDraft RemoveDraft",function(){e.disabled(!y.hasDraft(r))}),y.startStoreDraft(r,n)}},w=function(t,e){t.addButton("restoredraft",{title:"Restore last draft",onclick:function(){y.restoreLastDraft(t)},onPostRender:I(t,e)}),t.addMenuItem("restoredraft",{text:"Restore last draft",onclick:function(){y.restoreLastDraft(t)},onPostRender:I(t,e),context:"file"})};t.add("autosave",function(t){var e=n(!1);return b(t),w(t,e),h(t)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/ |\u00a0/gi," "),o(/"/gi,'"'),o(/</gi,"<"),o(/>/gi,">"),o(/&/gi,"&"),e},i=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),e};o.add("bbcode",function(){return{init:function(o){o.on("beforeSetContent",function(o){o.content=i(o.content)}),o.on("postProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=e(o.content))})}}})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){return e.fire("insertCustomChar",{chr:t})},l=function(e,t){var a=i(e,t).chr;e.execCommand("mceInsertContent",!1,a)},a=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){return e.settings.charmap},n=function(e){return e.settings.charmap_append},o=a.isArray,c=function(e){return o(e)?[].concat((t=e,a.grep(t,function(e){return o(e)&&2===e.length}))):"function"==typeof e?e():[];var t},s=function(e){return function(e,t){var a=r(e);a&&(t=c(a));var i=n(e);return i?[].concat(t).concat(c(i)):t}(e,[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(t){return t.getParam("code_dialog_width",600)},i=function(t){return t.getParam("code_dialog_height",Math.min(n.DOM.getViewPort().h-200,500))},c=function(t,n){t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged()},d=function(t){return t.getContent({source_view:!0})},e=function(n){var t=o(n),e=i(n);n.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:t,minHeight:e,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){c(n,t.data.code)}}).find("#code").value(d(n))},u=function(t){t.addCommand("mceCodeEditor",function(){e(t)})},a=function(t){t.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){e(t)}}),t.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){e(t)}})};t.add("code",function(t){return u(t),a(t),{}})}();
|
||||
@@ -0,0 +1,138 @@
|
||||
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #a67f59;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=function(e){var t=e,a=function(){return t};return{get:a,set:function(e){t=e},clone:function(){return n(a())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=function(e){return e.settings.codesample_content_css},a=function(e){return e.settings.codesample_languages},o=function(e){return Math.min(i.DOM.getViewPort().w,e.getParam("codesample_dialog_width",800))},l=function(e){return Math.min(i.DOM.getViewPort().w,e.getParam("codesample_dialog_height",650))},t={},r=t,u=void 0!==t?t:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},c=function(){var c=/\blang(?:uage)?-(?!\*)(\w+)\b/i,S=u.Prism={util:{encode:function(e){return e instanceof o?new o(e.type,S.util.encode(e.content),e.alias):"Array"===S.util.type(e)?e.map(S.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){switch(S.util.type(e)){case"Object":var t={};for(var a in e)e.hasOwnProperty(a)&&(t[a]=S.util.clone(e[a]));return t;case"Array":return e.map&&e.map(function(e){return S.util.clone(e)})}return e}},languages:{extend:function(e,t){var a=S.util.clone(S.languages[e]);for(var n in t)a[n]=t[n];return a},insertBefore:function(a,e,t,n){var i=(n=n||S.languages)[a];if(2===arguments.length){for(var r in t=e)t.hasOwnProperty(r)&&(i[r]=t[r]);return i}var s={};for(var o in i)if(i.hasOwnProperty(o)){if(o===e)for(var r in t)t.hasOwnProperty(r)&&(s[r]=t[r]);s[o]=i[o]}return S.languages.DFS(S.languages,function(e,t){t===n[a]&&e!==a&&(this[e]=s)}),n[a]=s},DFS:function(e,t,a){for(var n in e)e.hasOwnProperty(n)&&(t.call(e,n,e[n],a||n),"Object"===S.util.type(e[n])?S.languages.DFS(e[n],t):"Array"===S.util.type(e[n])&&S.languages.DFS(e[n],t,n))}},plugins:{},highlightAll:function(e,t){for(var a=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),n=0,i=void 0;i=a[n++];)S.highlightElement(i,!0===e,t)},highlightElement:function(e,t,a){for(var n,i,r=e;r&&!c.test(r.className);)r=r.parentNode;r&&(n=(r.className.match(c)||[,""])[1],i=S.languages[n]),e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+n,r=e.parentNode,/pre/i.test(r.nodeName)&&(r.className=r.className.replace(c,"").replace(/\s+/g," ")+" language-"+n);var s=e.textContent,o={element:e,language:n,grammar:i,code:s};if(s&&i)if(S.hooks.run("before-highlight",o),t&&u.Worker){var l=new Worker(S.filename);l.onmessage=function(e){o.highlightedCode=e.data,S.hooks.run("before-insert",o),o.element.innerHTML=o.highlightedCode,a&&a.call(o.element),S.hooks.run("after-highlight",o),S.hooks.run("complete",o)},l.postMessage(JSON.stringify({language:o.language,code:o.code,immediateClose:!0}))}else o.highlightedCode=S.highlight(o.code,o.grammar,o.language),S.hooks.run("before-insert",o),o.element.innerHTML=o.highlightedCode,a&&a.call(e),S.hooks.run("after-highlight",o),S.hooks.run("complete",o);else S.hooks.run("complete",o)},highlight:function(e,t,a){var n=S.tokenize(e,t);return o.stringify(S.util.encode(n),a)},tokenize:function(e,t,a){var n=S.Token,i=[e],r=t.rest;if(r){for(var s in r)t[s]=r[s];delete t.rest}e:for(var s in t)if(t.hasOwnProperty(s)&&t[s]){var o=t[s];o="Array"===S.util.type(o)?o:[o];for(var l=0;l<o.length;++l){var c=o[l],u=c.inside,g=!!c.lookbehind,d=0,p=c.alias;c=c.pattern||c;for(var f=0;f<i.length;f++){var h=i[f];if(i.length>e.length)break e;if(!(h instanceof n)){c.lastIndex=0;var m=c.exec(h);if(m){g&&(d=m[1].length);var b=m.index-1+d,y=b+(m=m[0].slice(d)).length,v=h.slice(0,b+1),k=h.slice(y+1),w=[f,1];v&&w.push(v);var x=new n(s,u?S.tokenize(m,u):m,p);w.push(x),k&&w.push(k),Array.prototype.splice.apply(i,w)}}}}}return i},hooks:{all:{},add:function(e,t){var a=S.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=S.hooks.all[e];if(a&&a.length)for(var n=0,i=void 0;i=a[n++];)i(t)}}},o=S.Token=function(e,t,a){this.type=e,this.content=t,this.alias=a};if(o.stringify=function(t,a,e){if("string"==typeof t)return t;if("Array"===S.util.type(t))return t.map(function(e){return o.stringify(e,a,t)}).join("");var n={type:t.type,content:o.stringify(t.content,a,e),tag:"span",classes:["token",t.type],attributes:{},language:a,parent:e};if("comment"===n.type&&(n.attributes.spellcheck="true"),t.alias){var i="Array"===S.util.type(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(n.classes,i)}S.hooks.run("wrap",n);var r="";for(var s in n.attributes)r+=(r?" ":"")+s+'="'+(n.attributes[s]||"")+'"';return"<"+n.tag+' class="'+n.classes.join(" ")+'" '+r+">"+n.content+"</"+n.tag+">"},!u.document)return u.addEventListener&&u.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,n=t.code,i=t.immediateClose;u.postMessage(S.highlight(n,S.languages[a],a)),i&&u.close()},!1),u.Prism}();void 0!==r&&(r.Prism=c),c.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Color"),a=function(e,n){e.find("#preview")[0].getEl().style.background=n},o=function(e,n){var i=l(n),t=i.toRgb();e.fromJSON({r:t.r,g:t.g,b:t.b,hex:i.toHex().substr(1)}),a(e,i.toHex())},t=function(e,n,i){var t=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:i,onchange:function(){var e=this.rgb();t&&(t.find("#r").value(e.r),t.find("#g").value(e.g),t.find("#b").value(e.b),t.find("#hex").value(this.value().substr(1)),a(t,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,n,i=t.find("colorpicker")[0];if(e=this.name(),n=this.value(),"hex"===e)return o(t,n="#"+n),void i.value(n);n={r:t.find("#r").value(),g:t.find("#g").value(),b:t.find("#b").value()},i.value(n),o(t,n)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){n("#"+t.toJSON().hex)}});o(t,i)};e.add("colorpicker",function(i){i.settings.color_picker_callback||(i.settings.color_picker_callback=function(e,n){t(i,e,n)})})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var o=function(t){var n=t,e=function(){return n};return{get:e,set:function(t){n=t},clone:function(){return o(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(t){return{isContextMenuVisible:function(){return t.get()}}},r=function(t){return t.settings.contextmenu_never_use_native},u=function(t){return t.getParam("contextmenu","link openlink image inserttable | cell row column deletetable")},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=function(t){return l.DOM.select(t.settings.ui_container)[0]},a=function(t,n){return{x:t,y:n}},f=function(t,n,e){return a(t.x+n,t.y+e)},m=function(t,n){if(t&&"static"!==l.DOM.getStyle(t,"position",!0)){var e=l.DOM.getPos(t),o=e.x-t.scrollLeft,i=e.y-t.scrollTop;return f(n,-o,-i)}return f(n,0,0)},c=function(t,n){if(t.inline)return m(s(t),a((u=n).pageX,u.pageY));var e,o,i,r,u,c=(e=t.getContentAreaContainer(),o=a((r=n).clientX,r.clientY),i=l.DOM.getPos(e),f(o,i.x,i.y));return m(s(t),c)},g=tinymce.util.Tools.resolve("tinymce.ui.Factory"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=function(t,n,e,o){null===o.get()?o.set(function(e,n){var t,o,i=[];o=u(e),v.each(o.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"===t&&(n={text:t}),n&&(n.shortcut="",i.push(n))});for(var r=0;r<i.length;r++)"|"===i[r].text&&(0!==r&&r!==i.length-1||i.splice(r,1));return(t=g.create("menu",{items:i,context:"contextmenu",classes:"contextmenu"})).uiContainer=s(e),t.renderTo(s(e)),t.on("hide",function(t){t.control===this&&n.set(!1)}),e.on("remove",function(){t.remove(),t=null}),t}(t,e)):o.get().show(),o.get().moveTo(n.x,n.y),e.set(!0)},x=function(e,o,i){e.on("contextmenu",function(t){var n;n=e,(!t.ctrlKey||r(n))&&(t.preventDefault(),y(e,c(e,t),o,i))})};t.add("contextmenu",function(t){var n=o(null),e=o(!1);return x(t,e,n),i(e)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(t,e){var i,n=t.dom,o=t.selection.getSelectedBlocks();o.length&&(i=n.getAttrib(o[0],"dir"),c.each(o,function(t){n.getParent(t.parentNode,'*[dir="'+e+'"]',n.getRoot())||n.setAttrib(t,"dir",i!==e?e:null)}),t.nodeChanged())},i=function(t){t.addCommand("mceDirectionLTR",function(){e(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){e(t,"rtl")})},n=function(e){var i=[];return c.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(t){i.push(t+"[dir="+e+"]")}),i.join(",")},o=function(t){t.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:n("ltr")}),t.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:n("rtl")})};t.add("directionality",function(t){i(t),o(t)})}();
|
||||
|
After Width: | Height: | Size: 354 B |
|
After Width: | Height: | Size: 329 B |
|
After Width: | Height: | Size: 331 B |
|
After Width: | Height: | Size: 342 B |
|
After Width: | Height: | Size: 340 B |
|
After Width: | Height: | Size: 336 B |
|
After Width: | Height: | Size: 338 B |
|
After Width: | Height: | Size: 343 B |
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 323 B |
|
After Width: | Height: | Size: 344 B |
|
After Width: | Height: | Size: 338 B |
|
After Width: | Height: | Size: 328 B |
|
After Width: | Height: | Size: 337 B |
|
After Width: | Height: | Size: 350 B |
|
After Width: | Height: | Size: 336 B |
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]],i=function(i){var o;return o='<table role="list" class="mce-grid">',e.each(n,function(t){o+="<tr>",e.each(t,function(t){var e=i+"/img/smiley-"+t+".gif";o+='<td><a href="#" data-mce-url="'+e+'" data-mce-alt="'+t+'" tabindex="-1" role="option" aria-label="'+t+'"><img src="'+e+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),o+="</tr>"}),o+="</table>"},o=function(a,t){var e=i(t);a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:e,onclick:function(t){var e,i,o,n=a.dom.getParent(t.target,"a");n&&(e=a,i=n.getAttribute("data-mce-url"),o=n.getAttribute("data-mce-alt"),e.insertContent(e.dom.createHTML("img",{src:i,alt:o})),this.hide())}},tooltip:"Emoticons"})};t.add("emoticons",function(t,e){o(t,e)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var l=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return l(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.html.DomParser"),f=tinymce.util.Tools.resolve("tinymce.html.Node"),m=tinymce.util.Tools.resolve("tinymce.html.Serializer"),h=function(e){return e.getParam("fullpage_hide_in_source_view")},r=function(e){return e.getParam("fullpage_default_xml_pi")},o=function(e){return e.getParam("fullpage_default_encoding")},a=function(e){return e.getParam("fullpage_default_font_family")},c=function(e){return e.getParam("fullpage_default_font_size")},s=function(e){return e.getParam("fullpage_default_text_color")},u=function(e){return e.getParam("fullpage_default_title")},d=function(e){return e.getParam("fullpage_default_doctype","<!DOCTYPE html>")},p=function(e){return t({validate:!1,root_name:"#document"}).parse(e)},y=p,v=function(e,t){var n,l,i=p(t),r={};function o(e,t){return e.attr(t)||""}return r.fontface=a(e),r.fontsize=c(e),7===(n=i.firstChild).type&&(r.xml_pi=!0,(l=/encoding="([^"]+)"/.exec(n.value))&&(r.docencoding=l[1])),(n=i.getAll("#doctype")[0])&&(r.doctype="<!DOCTYPE"+n.value+">"),(n=i.getAll("title")[0])&&n.firstChild&&(r.title=n.firstChild.value),g.each(i.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?r[n.toLowerCase()]=e.attr("content"):"Content-Type"===l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(r.docencoding=t[1])}),(n=i.getAll("html")[0])&&(r.langcode=o(n,"lang")||o(n,"xml:lang")),r.stylesheets=[],g.each(i.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&r.stylesheets.push(e.attr("href"))}),(n=i.getAll("body")[0])&&(r.langdir=o(n,"dir"),r.style=o(n,"style"),r.visited_color=o(n,"vlink"),r.link_color=o(n,"link"),r.active_color=o(n,"alink")),r},_=function(e,r,t){var o,n,l,a,i,c=e.dom;function s(e,t,n){e.attr(t,n||undefined)}function u(e){n.firstChild?n.insert(e,n.firstChild):n.append(e)}o=p(t),(n=o.getAll("head")[0])||(a=o.getAll("html")[0],n=new f("head",1),a.firstChild?a.insert(n,a.firstChild,!0):a.append(n)),a=o.firstChild,r.xml_pi?(i='version="1.0"',r.docencoding&&(i+=' encoding="'+r.docencoding+'"'),7!==a.type&&(a=new f("xml",7),o.insert(a,o.firstChild,!0)),a.value=i):a&&7===a.type&&a.remove(),a=o.getAll("#doctype")[0],r.doctype?(a||(a=new f("#doctype",10),r.xml_pi?o.insert(a,o.firstChild):u(a)),a.value=r.doctype.substring(9,r.doctype.length-1)):a&&a.remove(),a=null,g.each(o.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(a=e)}),r.docencoding?(a||((a=new f("meta",1)).attr("http-equiv","Content-Type"),a.shortEnded=!0,u(a)),a.attr("content","text/html; charset="+r.docencoding)):a&&a.remove(),a=o.getAll("title")[0],r.title?(a?a.empty():u(a=new f("title",1)),a.append(new f("#text",3)).value=r.title):a&&a.remove(),g.each("keywords,description,author,copyright,robots".split(","),function(e){var t,n,l=o.getAll("meta"),i=r[e];for(t=0;t<l.length;t++)if((n=l[t]).attr("name")===e)return void(i?n.attr("content",i):n.remove());i&&((a=new f("meta",1)).attr("name",e),a.attr("content",i),a.shortEnded=!0,u(a))});var d={};return g.each(o.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&(d[e.attr("href")]=e)}),g.each(r.stylesheets,function(e){d[e]||((a=new f("link",1)).attr({rel:"stylesheet",text:"text/css",href:e}),a.shortEnded=!0,u(a)),delete d[e]}),g.each(d,function(e){e.remove()}),(a=o.getAll("body")[0])&&(s(a,"dir",r.langdir),s(a,"style",r.style),s(a,"vlink",r.visited_color),s(a,"link",r.link_color),s(a,"alink",r.active_color),c.setAttribs(e.getBody(),{style:r.style,dir:r.dir,vLink:r.visited_color,link:r.link_color,aLink:r.active_color})),(a=o.getAll("html")[0])&&(s(a,"lang",r.langcode),s(a,"xml:lang",r.langcode)),n.firstChild||n.remove(),(l=m({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(o)).substring(0,l.indexOf("</body>"))},n=function(n,l){var i=v(n,l.get());n.windowManager.open({title:"Document properties",data:i,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(e){var t=_(n,g.extend(i,e.data),l.get());l.set(t)}})},i=function(e,t){e.addCommand("mceFullPageProperties",function(){n(e,t)})},b=function(e,t){return g.each(e,function(e){t=t.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})}),t},x=function(e){return e.replace(/<!--mce:protected ([\s\S]*?)-->/g,function(e,t){return unescape(t)})},k=g.each,C=function(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})},A=function(e){var t,n="",l="";if(r(e)){var i=o(e);n+='<?xml version="1.0" encoding="'+(i||"ISO-8859-1")+'" ?>\n'}Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=function(e,n){e.fire("FullscreenStateChanged",{state:n})},g=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=document.body,u=document.documentElement,d=n.get(),a=function(){var e,n,t,i;g.setStyle(l,"height",(t=window,i=document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){g.unbind(window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),g.removeClass(s,"mce-fullscreen"),g.removeClass(u,"mce-fullscreen"),g.removeClass(r,"mce-fullscreen"),o=d.scrollPos,window.scrollTo(o.x,o.y),g.unbind(window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),m(e,!1);else{var f={scrollPos:(c=g.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",g.addClass(s,"mce-fullscreen"),g.addClass(u,"mce-fullscreen"),g.addClass(r,"mce-fullscreen"),g.bind(window,"resize",a),e.on("remove",h),a(),n.set(f),m(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}();
|
||||
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e,t,n,r,o,a,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=function(e){return function(){return e}},c=function(a){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var i=new Array(arguments.length-1),n=1;n<arguments.length;n++)i[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=i.concat(n);return a.apply(null,o)}},u=l(!1),s=l(!0),f=u,m=s,d=function(){return p},p=(r={fold:function(e,t){return e()},is:f,isSome:f,isNone:m,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:t,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:f,forall:m,filter:d,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:l("none()")},Object.freeze&&Object.freeze(r),r),h=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:m,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return h(e(n))},ap:function(e){return e.fold(d,function(e){return h(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:p},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(f,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},y={some:h,none:d,from:function(e){return null===e||e===undefined?p:h(e)}},g=(o="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===o}),k=(a=Array.prototype.indexOf)===undefined?function(e,t){return x(e,t)}:function(e,t){return a.call(e,t)},v=function(e,t){return-1<k(e,t)},b=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var a=e[o];r[o]=t(a,o,e)}return r},x=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},w=(Array.prototype.slice,g(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.I18n")),A=tinymce.util.Tools.resolve("tinymce.Env"),C=A.mac?"\u2318":"Ctrl",S=A.mac?"Ctrl + Alt":"Shift + Alt",O={shortcuts:[{shortcut:C+" + B",action:"Bold"},{shortcut:C+" + I",action:"Italic"},{shortcut:C+" + U",action:"Underline"},{shortcut:C+" + A",action:"Select all"},{shortcut:C+" + Y or "+C+" + Shift + Z",action:"Redo"},{shortcut:C+" + Z",action:"Undo"},{shortcut:S+" + 1",action:"Header 1"},{shortcut:S+" + 2",action:"Header 2"},{shortcut:S+" + 3",action:"Header 3"},{shortcut:S+" + 4",action:"Header 4"},{shortcut:S+" + 5",action:"Header 5"},{shortcut:S+" + 6",action:"Header 6"},{shortcut:S+" + 7",action:"Paragraph"},{shortcut:S+" + 8",action:"Div"},{shortcut:S+" + 9",action:"Address"},{shortcut:"Alt + F9",action:"Focus to menubar"},{shortcut:"Alt + F10",action:"Focus to toolbar"},{shortcut:"Alt + F11",action:"Focus to element path"},{shortcut:"Ctrl + Shift + P > Ctrl + Shift + P",action:"Focus to contextual toolbar"},{shortcut:C+" + K",action:"Insert link (if link plugin activated)"},{shortcut:C+" + S",action:"Save (if save plugin activated)"},{shortcut:C+" + F",action:"Find (if searchreplace plugin activated)"}]},P=function(){var e=b(O.shortcuts,function(e){return'<tr data-mce-tabstop="1" tabindex="-1" aria-label="Action: '+(t=e).action+", Shortcut: "+t.shortcut.replace(/Ctrl/g,"Control")+'"><td>'+w.translate(e.action)+"</td><td>"+e.shortcut+"</td></tr>";var t}).join("");return{title:"Handy Shortcuts",type:"container",style:"overflow-y: auto; overflow-x: hidden; max-height: 250px",items:[{type:"container",html:'<div><table class="mce-table-striped"><thead><th>'+w.translate("Action")+"</th><th>"+w.translate("Shortcut")+"</th></thead>"+e+"</table></div>"}]}},T=Object.keys,_=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"compat3x",name:"3.x Compatibility"},{key:"contextmenu",name:"Context Menu"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"NonLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},o=function(n){n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};n.add("hr",function(n){t(n),o(n)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(e){return!1!==e.settings.image_dimensions},i=function(e){return!0===e.settings.image_advtab},g=function(e){return e.getParam("image_prepend_url","")},n=function(e){return e.getParam("image_class_list")},r=function(e){return!1!==e.settings.image_description},a=function(e){return!0===e.settings.image_title},o=function(e){return!0===e.settings.image_caption},l=function(e){return e.getParam("image_list",!1)},u=function(e){return e.getParam("images_upload_url",!1)},c=function(e){return e.getParam("images_upload_handler",!1)},s=function(e){return e.getParam("images_upload_url")},m=function(e){return e.getParam("images_upload_handler")},f=function(e){return e.getParam("images_upload_base_path")},p=function(e){return e.getParam("images_upload_credentials")},h="undefined"!=typeof window?window:Function("return this;")(),v=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:h,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},t={getOrDie:function(e,t){var n=v(e,t);if(n===undefined||null===n)throw e+" not available on this browser";return n}};function b(){return new(t.getOrDie("FileReader"))}var y,x=tinymce.util.Tools.resolve("tinymce.util.Promise"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),C=tinymce.util.Tools.resolve("tinymce.util.XHR"),S=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},N=function(e,n){var r=document.createElement("img");function t(e,t){r.parentNode&&r.parentNode.removeChild(r),n({width:e,height:t})}r.onload=function(){t(S(r.width,r.clientWidth),S(r.height,r.clientHeight))},r.onerror=function(){t(0,0)};var a=r.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left="0px",a.width=a.height="auto",document.body.appendChild(r),r.src=e},_=function(e,a,t){return function n(e,r){return r=r||[],w.each(e,function(e){var t={text:e.text||e.title};e.menu?t.menu=n(e.menu):(t.value=e.value,a(t)),r.push(t)}),r}(e,t||[])},A=function(e){return e&&(e=e.replace(/px$/,"")),e},T=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},R=function(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},I=function(e,t){var n=l(e);"string"==typeof n?C.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeof n?n(t):t(n)},O=function(e,t,n){function r(){n.onload=n.onerror=null,e.selection&&(e.selection.select(n),e.nodeChanged())}n.onload=function(){t.width||t.height||!d(e)||e.dom.setAttribs(n,{width:n.clientWidth,height:n.clientHeight}),r()},n.onerror=r},L=function(r){return new x(function(e,t){var n=new b;n.onload=function(){e(n.result)},n.onerror=function(){t(b.error.message)},n.readAsDataURL(r)})},P=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),U=Object.prototype.hasOwnProperty,E=(y=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var a=e[r];for(var o in a)U.call(a,o)&&(n[o]=y(n[o],a[o]))}return n}),k=P.DOM,M=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?A(e.style.marginLeft):""},D=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?A(e.style.marginTop):""},z=function(e){return e.style.borderWidth?A(e.style.borderWidth):""},B=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},H=function(e,t){return e.style[t]?e.style[t]:""},j=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},F=function(e,t,n){e.setAttribute(t,n)},W=function(e){var t,n,r,a;j(e)?(a=(r=e).parentNode,k.insertAfter(r,a),k.remove(a)):(t=e,n=k.create("figure",{"class":"image"}),k.insertAfter(n,t),n.appendChild(t),n.appendChild(k.create("figcaption",{contentEditable:!0},"Caption")),n.contentEditable="false")},J=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},V=function(e,r){return function(e,t,n){e.style[t]?(e.style[t]=T(n),J(e,r)):F(e,t,n)}},G=function(e,t){return e.style[t]?A(e.style[t]):B(e,t)},$=function(e,t){var n=T(t);e.style.marginLeft=n,e.styleLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var r=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return r(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),$=tinymce.util.Tools.resolve("tinymce.util.Tools");function n(t,e){return i(document.createElement("canvas"),t,e)}function o(t){return t.getContext("2d")}function i(t,e,n){return t.width=e,t.height=n,t}var a,u,c,l,h={create:n,clone:function(t){var e;return o(e=n(t.width,t.height)).drawImage(t,0,0),e},resize:i,get2dContext:o,get3dContext:function(t){var e=null;try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(n){}return e||(e=null),e}},p={getWidth:function(t){return t.naturalWidth||t.width},getHeight:function(t){return t.naturalHeight||t.height}},g=window.Promise?window.Promise:function(){var t=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(t,r(o,this),r(a,this))},e=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,1)};function r(t,e){return function(){t.apply(e,arguments)}}var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(r){var o=this;null!==this._state?e(function(){var t=o._state?r.onFulfilled:r.onRejected;if(null!==t){var e;try{e=t(o._value)}catch(n){return void r.reject(n)}r.resolve(e)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function o(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void l(r(e,t),r(o,this),r(a,this))}this._state=!0,this._value=t,u.call(this)}catch(n){a.call(this,n)}}function a(t){this._state=!1,this._value=t,u.call(this)}function u(){for(var t=0,e=this._deferreds.length;t<e;t++)i.call(this,this._deferreds[t]);this._deferreds=null}function c(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function l(t,e,n){var r=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(o){if(r)return;r=!0,n(o)}}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype.then=function(n,r){var o=this;return new t(function(t,e){i.call(o,new c(n,r,t,e))})},t.all=function(){var c=Array.prototype.slice.call(1===arguments.length&&n(arguments[0])?arguments[0]:arguments);return new t(function(o,i){if(0===c.length)return o([]);var a=c.length;function u(e,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){u(e,t)},i)}c[e]=t,0==--a&&o(c)}catch(r){i(r)}}for(var t=0;t<c.length;t++)u(t,c[t])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(n){return new t(function(t,e){e(n)})},t.race=function(o){return new t(function(t,e){for(var n=0,r=o.length;n<r;n++)o[n].then(t,e)})},t}(),s=function(t){return function(){return t}},f=function(i){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];for(var a=new Array(arguments.length-1),n=1;n<arguments.length;n++)a[n-1]=arguments[n];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=a.concat(n);return i.apply(null,o)}},d=s(!1),m=s(!0),y=d,v=m,b=function(){return w},w=(l={fold:function(t,e){return t()},is:y,isSome:y,isNone:v,getOr:c=function(t){return t},getOrThunk:u=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:c,orThunk:u,map:b,ap:b,each:function(){},bind:b,flatten:b,exists:y,forall:v,filter:b,equals:a=function(t){return t.isNone()},equals_:a,toArray:function(){return[]},toString:s("none()")},Object.freeze&&Object.freeze(l),l),x=function(n){var t=function(){return n},e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:v,isNone:y,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return x(t(n))},ap:function(t){return t.fold(b,function(t){return x(t(n))})},each:function(t){t(n)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(n)?o:w},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(y,function(t){return e(n,t)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},I={some:x,none:b,from:function(t){return null===t||t===undefined?w:x(t)}},T="undefined"!=typeof window?window:Function("return this;")(),R=function(t,e){return function(t,e){for(var n=e!==undefined&&null!==e?e:T,r=0;r<t.length&&n!==undefined&&null!==n;++r)n=n[t[r]];return n}(t.split("."),e)},S={getOrDie:function(t,e){var n=R(t,e);if(nLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),v=tinymce.util.Tools.resolve("tinymce.EditorManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return e.getParam("importcss_merge_classes")},n=function(e){return e.getParam("importcss_exclusive")},_=function(e){return e.getParam("importcss_selector_converter")},r=function(e){return e.getParam("importcss_selector_filter")},i=function(e){return e.getParam("importcss_groups")},u=function(e){return e.getParam("importcss_append")},l=function(e){return e.getParam("importcss_file_filter")},a=function(t){return"string"==typeof t?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t},f=function(f,e,m){var g=[],n={};function p(e,t){var n,r,i,c=e.href;if(r=c,i=h.cacheSuffix,"string"==typeof r&&(r=r.replace("?"+i,"").replace("&"+i,"")),(c=r)&&m(c,t)&&(o=c,u=(s=f).settings,!(l=!1!==u.skin&&(u.skin||"lightgray"))||o!==(u.skin_url?s.documentBaseURI.toAbsolute(u.skin_url):v.baseURL+"/skins/"+l)+"/content"+(s.inline?".inline":"")+".min.css")){var s,o,u,l;y.each(e.imports,function(e){p(e,!0)});try{n=e.cssRules||e.rules}catch(a){}y.each(n,function(e){e.styleSheet?p(e.styleSheet,!0):e.selectorText&&y.each(e.selectorText.split(","),function(e){g.push(y.trim(e))})})}}y.each(f.contentCSS,function(e){n[e]=!0}),m||(m=function(e,t){return t||n[e]});try{y.each(e.styleSheets,function(e){p(e)})}catch(t){}return g},x=function(e,t){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(r){var i=r[1],c=r[2].substr(1).split(".").join(" "),s=y.makeMap("a,img");return r[1]?(n={title:t},e.schema.getTextBlockElements()[i]?n.block=i:e.schema.getBlockElements()[i]||s[i.toLowerCase()]?n.selector=i:n.inline=i):r[2]&&(n={inline:"span",title:t.substr(1),classes:c}),!1!==o(e)?n.classes=c:n.attributes={"class":c},n}},T=function(e,t){return null===t||!1!==n(e)},c=x,t=function(h){h.on("renderFormatsMenu",function(e){var t,p={},c=a(r(h)),v=e.control,s=(t=i(h),y.map(t,function(e){return y.extend({},e,{original:e,selectors:{},filter:a(e.filter),item:{text:e.title,menu:[]}})})),o=function(e,t){if(f=e,g=p,!(T(h,m=t)?f in g:f in m.selectors)){u=e,a=p,T(h,l=t)?a[u]=!0:l.selectors[u]=!0;var n=(c=(i=h).plugins.importcss,s=e,((o=t)&&o.selector_converter?o.selector_converter:_(i)?_(i):function(){return x(i,s)}).call(c,s,o));if(n){var r=n.name||d.DOM.uniqueId();return h.formatter.register(r,n),y.extend({},v.settings.itemDefaults,{text:n.title,format:r})}}var i,c,s,o,u,l,a,f,m,g;return null};u(h)||v.items().remove(),y.each(f(h,e.doc||h.getDoc(),a(l(h))),function(n){if(-1===n.indexOf(".mce-")&&(!c||c(n))){var e=(r=s,i=n,y.grep(r,function(e){return!e.filter||e.filter(i)}));if(0<e.length)y.each(e,function(e){var t=o(n,e);t&&e.item.menu.push(t)});else{var t=o(n,null);t&&v.add(t)}}var r,i}),y.each(s,function(e){0<e.item.menu.length&&v.add(e.item)}),e.control.renderNew()})},s=function(t){return{convertSelectorToFormat:function(e){return c(t,e)}}};e.add("importcss",function(e){return t(e),s(e)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},a=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},i=n,o=a,u=function(e){var t=a(e);return 0<t.length?t[0]:n(e)},m=function(e){return e.getParam("insertdatetime_element",!1)},c="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),d="January February March April May June July August September October November December".split(" "),p=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},f=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",p(n.getMonth()+1,2))).replace("%d",p(n.getDate(),2))).replace("%H",""+p(n.getHours(),2))).replace("%M",""+p(n.getMinutes(),2))).replace("%S",""+p(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(d[n.getMonth()]))).replace("%b",""+e.translate(s[n.getMonth()]))).replace("%A",""+e.translate(l[n.getDay()]))).replace("%a",""+e.translate(c[n.getDay()]))).replace("%%","%")},g=function(e,t){if(m(e)){var n=f(e,t),r=void 0;r=/%[HMSIp]/.test(t)?f(e,"%Y-%m-%dT%H:%M"):f(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?(o=a,u=r,c=n,l=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(l,o),i.dom.remove(o),i.selection.select(l,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(f(e,t));var i,o,u,c,l},y=f,M=function(e){e.addCommand("mceInsertDate",function(){g(e,t(e))}),e.addCommand("mceInsertTime",function(){g(e,i(e))})},v=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(t,n){var r,a,e,i=(a=n,e=o(r=t),v.map(e,function(e){return{text:y(r,e),onclick:function(){a.set(e),g(r,e)}}}));t.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",menu:i,onclick:function(){var e=n.get();g(t,e||u(t))}}),t.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:i,context:"insert"})};e.add("insertdatetime",function(e){var t=r(null);M(e),S(e,t)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(a){a.settings.inline_styles=!1,a.on("init",function(){var e,t,n,i;e=a,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",n=o.explode(e.settings.font_size_style_values),i=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(e){return o.inArray(n,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),o.each("b,i,u,strike".split(","),function(e){i.addValidElements(e+"[*]")}),i.getElementRule("font")||i.addValidElements("font[face|size|color|style]"),o.each(t.split(","),function(e){var t=i.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})},n=function(i){i.addButton("fontsizeselect",function(){var o=[],e=i.settings.fontsizeFormats||"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7";return i.$.each(e.split(" "),function(e,t){var n=t,i=t,a=t.split("=");1<a.length&&(n=a[0],i=a[1]),o.push({text:n,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:o,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.size):t.value("")})},onclick:function(e){e.control.settings.value&&i.execCommand("FontSize",!1,e.control.settings.value)}}}),i.addButton("fontselect",function(){var n=[],e=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(i.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return i.$.each(e,function(e,t){n.push({text:{raw:t[0]},value:t[1],textStyle:-1===t[1].indexOf("dings")?"font-family:"+t[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.face):t.value("")})},onselect:function(e){e.control.settings.value&&i.execCommand("FontName",!1,e.control.settings.value)}}})};e.add("legacyoutput",function(e){t(e),n(e)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),e=function(t){return t.target_list},o=function(t){return t.rel_list},i=function(t){return t.link_class_list},p=function(t){return"boolean"==typeof t.link_assume_external_targets&&t.link_assume_external_targets},a=function(t){return"boolean"==typeof t.link_context_toolbar&&t.link_context_toolbar},r=function(t){return t.link_list},k=function(t){return"string"==typeof t.default_link_target},y=function(t){return t.default_link_target},b=e,_=function(t,e){t.settings.target_list=e},w=function(t){return!1!==e(t)},T=o,C=function(t){return o(t)!==undefined},M=i,O=function(t){return i(t)!==undefined},R=function(t){return!1!==t.link_title},N=function(t){return"boolean"==typeof t.allow_unsafe_link_target&&t.allow_unsafe_link_target},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),u=tinymce.util.Tools.resolve("tinymce.Env"),c=function(t){if(!u.ie||10<u.ie){var e=document.createElement("a");e.target="_blank",e.href=t,e.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r=e,a=n,document.body.appendChild(r),r.dispatchEvent(a),document.body.removeChild(r)}else{var o=window.open("","_blank");if(o){o.opener=null;var i=o.document;i.open(),i.write('<meta http-equiv="refresh" content="0; url='+l.DOM.encode(t)+'">'),i.close()}}var r,a},A=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e){var n,o,i=["noopener"],r=t?t.split(/\s+/):[],a=function(t){return t.filter(function(t){return-1===A.inArray(i,t)})};return(r=e?(n=a(n=r)).length?n.concat(i):i:a(r)).length?(o=r,A.trim(o.sort().join(" "))):null},f=function(t,e){return e=e||t.selection.getNode(),m(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},d=function(t){return t&&"A"===t.nodeName&&t.href},m=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},v=function(t,e){var n,o;(o=t.dom.select("img",e)[0])&&(n=t.dom.getParents(o,"a[href]",e)[0])&&(n.parentNode.insertBefore(o,n),t.dom.remove(n))},g=function(t,e,n){var o,i;(i=t.dom.select("img",e)[0])&&(o=t.dom.create("a",n),i.parentNode.insertBefore(o,i),o.appendChild(i))},L=function(i,r){return function(o){i.undoManager.transact(function(){var t=i.selection.getNode(),e=f(i,t),n={href:o.href,target:o.target?o.target:null,rel:o.rel?o.rel:null,"class":o["class"]?o["class"]:null,title:o.title?o.title:null};C(i.settings)||!1!==N(i.settings)||(n.rel=s(n.rel,"_blank"===n.target)),o.href===r.href&&(r.attach(),r={}),e?(i.focus(),o.hasOwnProperty("text")&&("innerText"in e?e.innerText=o.text:e.textContent=o.text),i.dom.setAttribs(e,n),i.selection.select(e),i.undoManager.add()):m(t)?g(i,t,n):o.hasOwnProperty("text")?i.insertContent(i.dom.createHTML("a",n,i.dom.encode(o.text))):i.execCommand("mceInsertLink",!1,n)})}},P=function(e){return function(){e.undoManager.transact(function(){var t=e.selection.getNode();m(t)?v(e,t):e.execCommand("unlink")})}},h=d,x=function(t){return 0<A.grep(t,d).length},E=function(t){return!(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},S=f,I=function(t,e){var n=e?e.innerText||e.textContent:t.getContent({format:"text"});return n.replace(/\uFEFF/g,"")},K=s,U=tinymce.util.Tools.resolve("tinymce.util.Delay"),D=tinymce.util.Tools.resolve("tinymce.util.XHR"),B={},F=function(t,o,e){var i=function(t,n){return n=n||[],A.each(t,function(t){var e={text:t.text||t.title};t.menu?e.menu=i(t.menu):(e.value=t.value,o&&o(e)),n.push(e)}),n};return i(t,e||[])},q=function(e,t,n){var o=e.selection.getRng();U.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),n(t)})})},V=function(a,t){var e,l,o,u,n,i,r,c,s,f,d,m={},v=a.selection,g=a.dom,h=function(t){var e=o.find("#text");(!e.value()||t.lastControl&&e.value()===t.lastControl.text())&&e.value(t.control.text()),o.find("#href").value(t.control.value())},x=function(){l||!u||m.text||this.parent().parent().find("#text")[0].value(this.value())};u=E(v.getContent()),e=S(a),m.text=l=I(a.selection,e),m.href=e?g.getAttrib(e,"href"):"",e?m.target=g.getAttrib(e,"target"):k(a.settings)&&(m.target=y(a.settings)),(d=g.getAttrib(e,"rel"))&&(m.rel=d),(d=g.getAttrib(e,"class"))&&(m["class"]=d),(d=g.getAttrib(e,"title"))&&(m.title=d),u&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){m.text=this.value()}}),t&&(i={type:"listbox",label:"Link list",values:F(t,function(t){t.value=a.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:h,value:a.convertURL(m.href,"href"),onPostRender:function(){i=this}}),w(a.settings)&&(b(a.settings)===undefined&&_(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),c={name:"target",type:"listbox",label:"Target",values:F(b(a.settings))}),C(a.settings)&&(r={name:"rel",type:"listbox",label:"Rel",values:F(T(a.settings),function(t){!1===N(a.settings)&&(t.value=K(t.value,"_blank"===m.target))})}),O(Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),l=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(e){return e&&"BR"===e.nodeName},r=function(e){return e&&3===e.nodeType},h=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},i=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},a=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},C=o,s=function(e){return e.parentNode.firstChild===e},c=function(e){return e.parentNode.lastChild===e},y=function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},f=function(e,t){return e&&e.nodeName in t},u=function(e,t){return!!o(t)&&!(!e.isBlock(t.nextSibling)||o(t.previousSibling))},m=function(e,t,n){var o=e.isEmpty(t);return!(n&&0<e.select("span[data-mce-type=bookmark]",t).length)&&o},g=function(e,t){return e.isChildOf(t,e.getRoot())},N=function(e,t){var n=d.getNode(e,t);return i(e)&&r(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:{container:e,offset:t}},L=function(e){var t=e.cloneRange(),n=N(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var o=N(e.endContainer,e.endOffset);return t.setEnd(o.container,o.offset),t},S=t.DOM,b=function(r){var i={},e=function(e){var t,n,o;n=r[e?"startContainer":"endContainer"],o=r[e?"startOffset":"endOffset"],1===n.nodeType&&(t=S.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(o=Math.min(o,n.childNodes.length-1),e?n.insertBefore(t,n.childNodes[o]):S.insertAfter(t,n.childNodes[o])):n.appendChild(t),n=t,o=0),i[e?"startContainer":"endContainer"]=n,i[e?"startOffset":"endOffset"]=o};return e(!0),r.collapsed||e(),i},D=function(r){function e(e){var t,n,o;t=o=r[e?"startContainer":"endContainer"],n=r[e?"startOffset":"endOffset"],t&&(1===t.nodeType&&(n=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(t),t=t.parentNode,S.remove(o),!t.hasChildNodes()&&S.isBlock(t)&&t.appendChild(S.create("br"))),r[e?"startContainer":"endContainer"]=t,r[e?"startOffset":"endOffset"]=n)}e(!0),e();var t=S.createRng();return t.setStart(r.startContainer,r.startOffset),r.endContainer&&t.setEnd(r.endContainer,r.endOffset),L(t)},k=t.DOM,T=function(e,t){var n,o=t.parentNode;"LI"===o.nodeName&&o.firstChild===t&&((n=o.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),m(e,o)&&k.remove(o)):k.setStyle(o,"listStyleType","none")),h(o)&&(n=o.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)},I=function(t,e){v.each(v.grep(t.select("ol,ul",e)),function(e){T(t,e)})},B=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),R=function(e){var t=e.selection.getStart(!0);return e.dom.getParent(t,"OL,UL,DL",O(e,t))},O=function(e,t){var n=e.dom.getParents(t,"TD,TH");return 0<n.length?n[0]:e.getBody()},E={getParentList:R,getSelectedSubLists:function(e){var t,n,o,r=R(e),i=e.selection.getSelectedBlocks();return o=i,(n=r)&&1===o.length&&o[0]===n?(t=r,v.grep(t.querySelectorAll("ol,ul,dl"),function(e){return h(e)})):v.grep(i,function(e){return h(e)&&r!==e})},getSelectedListItems:function(e){var n,t,o,r=e.selection.getSelectedBlocks();return v.grep((n=e,t=r,o=v.map(t,function(e){var t=n.dom.getParent(e,"li,dd,dt",O(n,e));return t||e}),B.unique(o)),function(e){return i(e)})},getClosestListRootElm:O},A=tinymce.util.Tools.resolve("tinymce.Env"),P=t.DOM,x=function(e,t,n){var o,r,i,a=P.createFragment(),s=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&((r=P.create(n)).tagName===e.settings.forced_root_block&&P.setAttribs(r,e.settings.forced_root_block_attrs),f(t.firstChild,s)||a.appendChild(r)),t)for(;o=t.firstChild;){var d=o.nodeName;i||"SPAN"===d&&"bookmark"===o.getAttribute("data-mce-type")||(i=!0),f(o,s)?(a.appendChild(o),r=null):n?(r||(r=P.create(n),a.appendChild(r)),r.appendChild(o)):a.appendChild(o)}return e.settings.forced_root_block?i||A.ie&&!(10<A.ie)||r.appendChild(P.create("br",{"data-mce-bogus":"1"})):a.appendChild(P.create("br")),a},_=t.DOM,M=function(e,t,n,o){var r,i,a,s,d;for(a=_.select('span[data-mce-type="bookmark"]',t),o=o||x(e,n),(r=_.createRng()).setStartAfter(n),r.setEndAfter(t),s=(i=r.extractContents()).firstChild;s;s=s.firstChild)if("LI"===s.nodeName&&e.dom.isEmpty(s)){_.remove(s);break}e.dom.isEmpty(i)||_.insertAfter(i,t),_.insertAfter(o,t),m(e.dom,n.parentNode)&&(d=n.parentNode,v.each(a,function(e){d.parentNode.insertBefore(e,n.parentNode)}),_.remove(d)),_.remove(n),m(e.dom,t)&&_.remove(t)},U=t.DOM,H=function(e,t){m(e,t)&&U.remove(t)},$=function(e,t){var n,o,r=t.parentNode;return r?(n=r.parentNode,r===e.getBody()||("DD"===t.nodeName?U.rename(t,"DT"):s(t)&&c(t)?"LI"===n.nodeName?(U.insertAfter(t,n),H(e.dom,n),U.remove(r)):h(n)?U.remove(r,!0):(Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),w=function(e){return e.getParam("media_scripts")},b=function(e){return e.getParam("audio_template_callback")},y=function(e){return e.getParam("video_template_callback")},n=function(e){return e.getParam("media_live_embeds",!0)},t=function(e){return e.getParam("media_filter_html",!0)},s=function(e){return e.getParam("media_url_resolver")},m=function(e){return e.getParam("media_alt_source",!0)},d=function(e){return e.getParam("media_poster",!0)},h=function(e){return e.getParam("media_dimensions",!0)},p=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),x=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},i=function(t){return function(e){return e?e.style[t].replace(/px$/,""):""}},a=function(i){return function(e,t){var r;e&&(e.style[i]=/^[0-9.]+$/.test(r=t)?r+"px":r)}},f={getMaxWidth:i("maxWidth"),getMaxHeight:i("maxHeight"),setMaxWidth:a("maxWidth"),setMaxHeight:a("maxHeight")},u=r.DOM,l=function(e){return u.getAttrib(e,"data-ephox-embed-iri")},j=function(e,t){return c=t,s=u.createFragment(c),""!==l(s.firstChild)?(o=t,n=u.createFragment(o).firstChild,{type:"ephox-embed-iri",source1:l(n),source2:"",poster:"",width:f.getMaxWidth(n),height:f.getMaxHeight(n)}):(i=e,r=t,p({validate:(a={},!1),allow_conditional_comments:!0,special:"script,noscript",start:function(e,t){if(a.source1||"param"!==e||(a.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(a.type||(a.type=e),a=v.extend(t.map,a)),"script"===e){var r=x(i,t.map.src);if(!r)return;a={type:"script",source1:t.map.src,width:r.width,height:r.height}}"source"===e&&(a.source1?a.source2||(a.source2=t.map.src):a.source1=t.map.src),"img"!==e||a.poster||(a.poster=t.map.src)}}).parse(r),a.source1=a.source1||a.src||a.data,a.source2=a.source2||"",a.poster=a.poster||"",a);var i,r,a,o,n,c,s},g=tinymce.util.Tools.resolve("tinymce.util.Promise"),M=function(e){var t={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},_=tinymce.util.Tools.resolve("tinymce.html.Writer"),C=tinymce.util.Tools.resolve("tinymce.html.Schema"),S=r.DOM,F=function(e,t){var r,i,a,o;for(r in t)if(a=""+t[r],e.map[r])for(i=e.length;i--;)(o=e[i]).name===r&&(a?(e.map[r]=a,o.value=a):(delete e.map[r],e.splice(i,1)));else a&&(e.push({name:r,value:a}),e.map[r]=a)},k=function(e,t){var r,i,a=S.createFragment(e).firstChild;return f.setMaxWidth(a,t.width),f.setMaxHeight(a,t.height),r=a.outerHTML,i=_(),p(i).parse(r),i.getContent()},A=function(e,t,r){return u=e,l=S.createFragment(u),""!==S.getAttrib(l.firstChild,"data-ephox-embed-iri")?k(e,t):(i=e,a=t,o=r,c=_(),p({validate:!1,allow_conditional_comments:!(s=0),special:"script,noscript",comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){switch(e){case"video":case"object":case"embed":case"img":case"iframe":a.height!==undefined&&a.width!==undefined&&F(t,{width:a.width,height:a.height})}if(o)switch(e){case"video":F(t,{poster:a.poster,src:""}),a.source2&&F(t,{src:""});break;case"iframe":F(t,{src:a.source1});break;case"source":if(++s<=2&&(F(t,{src:a["source"+s],type:a["source"+s+"mime"]}),!a["source"+s]))return;break;case"img":if(!a.poster)return;n=!0}c.start(e,t,r)},end:function(e){if("video"===e&&o)for(var t=1;t<=2;t++)if(a["source"+t]){var r=[];r.map={},s<t&&(F(r,{src:a["source"+t],type:a["source"+t+"mime"]}),c.start("source",r,!0))}if(a.poster&&"object"===e&&o&&!n){var i=[];i.map={},F(i,{src:a.poster,width:a.width,height:a.height}),c.start("img",i,!0)}c.end(e)}},C({})).parse(i),c.getContent());var i,a,o,n,c,s,u,l},N=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],c=function(r,e){var iLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n,e){var t,i=(t=n).plugins.visualchars&&t.plugins.visualchars.isEnabled()?'<span class="mce-nbsp"> </span>':" ";n.insertContent(function(n,e){for(var t="",i=0;i<e;i++)t+=n;return t}(i,e)),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")},e=function(n){n.addCommand("mceNonBreaking",function(){i(n,1)})},o=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?!0===e?3:0:e},t=function(e){var t=a(e);0<t&&e.on("keydown",function(n){if(n.keyCode===o.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),i(e,t)}})},r=function(n){n.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),n.addMenuItem("nonbreaking",{icon:"nonbreaking",text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"})};n.add("nonbreaking",function(n){e(n),r(n),t(n)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},u=function(t){return t.getParam("noneditable_editable_class","mceEditable")},f=function(t){var n=t.getParam("noneditable_regexp",[]);return n&&n.constructor===RegExp?[n]:n},s=function(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}},d=function(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0<e?o.charAt(e-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",e);if(-1!==a&&-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(n[0])+'">'+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"}},n=function(n){var t,e,r="contenteditable";t=" "+c.trim(u(n))+" ",e=" "+c.trim(l(n))+" ";var a=s(t),i=s(e),o=f(n);n.on("PreInit",function(){0<o.length&&n.on("BeforeSetContent",function(t){!function(t,n,e){var r=n.length,a=e.content;if("raw"!==e.format){for(;r--;)a=a.replace(n[r],d(t,a,l(t)));e.content=a}}(n,o,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],a(n)?n.attr(r,"true"):i(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(a(n)||i(n))&&(0<o.length&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(r,null))})})};t.add("noneditable",function(t){n(t)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),n=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},i=function(e){return e.getParam("pagebreak_split_block",!1)},t=function(){return"mce-pagebreak"},r=function(){return'<img src="'+a.transparentSrc+'" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />'},c=function(c){var o=n(c),a=new RegExp(o.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");c.on("BeforeSetContent",function(e){e.content=e.content.replace(a,r())}),c.on("PreInit",function(){c.serializer.addNodeFilter("img",function(e){for(var a,n,t=e.length;t--;)if((n=(a=e[t]).attr("class"))&&-1!==n.indexOf("mce-pagebreak")){var r=a.parent;if(c.schema.getBlockElements()[r.name]&&i(c)){r.type=3,r.value=o,r.raw=!0,a.remove();continue}a.type=3,a.value=o,a.raw=!0}})})},o=r,g=t,u=function(e){e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+o()+"</p>"):e.insertContent(o())})},m=function(a){a.on("ResolveName",function(e){"IMG"===e.target.nodeName&&a.dom.hasClass(e.target,g())&&(e.name="pagebreak")})},s=function(e){e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"})};e.add("pagebreak",function(e){u(e),s(e),c(e),m(e)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var u=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return u(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(e.settings.plugins)||!t.get("powerpaste")||("undefined"!=typeof window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},s=function(e,t){return{clipboard:e,quirks:t}},f=function(e,t,n,r){return e.fire("PastePreProcess",{content:t,internal:n,wordContent:r})},d=function(e,t,n,r){return e.fire("PastePostProcess",{node:t,internal:n,wordContent:r})},l=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},n=function(e,t){return e.fire("paste",{ieFake:t})},m={shouldPlainTextInform:function(e){return e.getParam("paste_plaintext_inform",!0)},shouldBlockDrop:function(e){return e.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(e){return e.getParam("paste_data_images",!1)},shouldFilterDrop:function(e){return e.getParam("paste_filter_drop",!0)},getPreProcess:function(e){return e.getParam("paste_preprocess")},getPostProcess:function(e){return e.getParam("paste_postprocess")},getWebkitStyles:function(e){return e.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(e){return e.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(e){return e.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(e){return e.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(e){return e.getParam("paste_as_text",!1)},getRetainStyleProps:function(e){return e.getParam("paste_retain_style_properties")},getWordValidElements:function(e){return e.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(e){return e.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(e){return e.getParam("paste_enable_default_filters",!0)}},r=function(e,t,n){var r,a,i;"text"===t.pasteFormat.get()?(t.pasteFormat.set("html"),l(e,!1)):(t.pasteFormat.set("text"),l(e,!0),i=e,!1===n.get()&&m.shouldPlainTextInform(i)&&(a="Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.",(r=e).notificationManager.open({text:r.translate(a),type:"info"}),n.set(!0))),e.focus()},c=function(e,n,t){e.addCommand("mceTogglePlainTextPaste",function(){r(e,n,t)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&n.pasteHtml(t.content,t.internal),t.text&&n.pasteText(t.text)})},v=tinymce.util.Tools.resolve("tinymce.Env"),h=tinymce.util.Tools.resolve("tinymce.util.Delay"),b=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=tinymce.util.Tools.resolve("tinymce.util.VK"),e="x-tinymce/html",i="\x3c!-- "+e+" --\x3e",p=function(e){return i+e},g=function(e){return e.replace(i,"")},y=function(e){return-1!==e.indexOf(i)},x=function(){return e},P=tinymce.util.Tools.resolve("tinymce.html.Entities"),w=function(e){return e.replace(/\r?\n/g,"<br>")},_=function(e,t,n){var r=e.split(/\n\n/),a=function(e,t){var n,r=[],a="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+P.encodeAllRaw(t[n])+'"');r.length&&(a+=" "+r.join(" "))}return a+">"}(t,n),i="</"+t+">",o=b.map(r,function(e){return e.split(/\n/).join("<br />")});return 1===o.length?o[0]:b.map(o,function(e){return a+e+i}).join("")},D=function(e){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e)},T=function(e,t,n){return t?_(e,t,n):w(e)},C=tinymce.util.Tools.resolve("tinymce.html.DomParser"),k=tinymce.util.Tools.resolve("tinymce.html.Node"),R=tinymce.util.Tools.resolve("tinymce.html.Schema"),F=tinymce.util.Tools.resolve("tinymce.html.Serializer");function E(t,e){return b.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}var S={filter:E,innerText:function(t){var n=R(),r=C({},n),a="",i=n.getShortEndedElements(),o=b.makeMap("script noscript style textarea video audio iframe object"," "),s=n.getBlockElements();return t=E(t,[/<!\[[^\]]+\]>/g]),function e(t){var n=t.name,r=t;if("br"!==n)if(i[n]&&(a+=" "),o[n])a+=" ";else{if(3===t.type&&(a+=t.value),!t.shortEnded&&(t=t.firstChild))for(;e(t),t=t.next;);s[n]&&r.next&&(a+="\n","p"===n&&(a+="\n"))}else a+="\n"}(r.parse(t)),a},trimHtml:function(e){return e=E(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function(e){var t=0;return function(){return e+t++}},isMsEdge:function(){return-1!==navigator.userAgent.indexOf(" Edge/")}};function I(t){var n,e;return
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.Env"),c=function(e){return parseInt(e.getParam("plugin_preview_width","650"),10)},a=function(e){return parseInt(e.getParam("plugin_preview_height","500"),10)},s=function(e){return e.getParam("content_style","")},d=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){var n="",i=t.dom.encode,e=s(t);n+='<base href="'+i(t.documentBaseURI.getURI())+'">',e&&(n+='<style type="text/css">'+e+"</style>"),d.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'">'});var o=t.settings.body_id||"tinymce";-1!==o.indexOf("=")&&(o=(o=t.getParam("body_id","","hash"))[t.id]||o);var r=t.settings.body_class||"";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_class","","hash"))[t.id]||"");var c=t.settings.directionality?' dir="'+t.settings.directionality+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(o)+'" class="mce-content-body '+i(r)+'"'+i(c)+">"+t.getContent()+'<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);<\/script> </body></html>'},m=function(e,t,n){var i=l(e);if(n)t.src="data:text/html;charset=utf-8,"+encodeURIComponent(i);else{var o=t.contentWindow.document;o.open(),o.write(i),o.close()}},t=function(n){var i=!r.ie,e='<iframe src="" frameborder="0"'+(i?' sandbox="allow-scripts"':"")+"></iframe>",t=c(n),o=a(n);n.windowManager.open({title:"Preview",width:t,height:o,html:e,buttons:{text:"Close",onclick:function(e){e.control.parent().parent().close()}},onPostRender:function(e){var t=e.control.getEl("body").firstChild;m(n,t,i)}})},n=function(e){e.addCommand("mcePreview",function(){t(e)})},i=function(e){e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})};e.add("preview",function(e){n(e),i(e)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){t.addCommand("mcePrint",function(){t.getWin().print()})},i=function(t){t.addButton("print",{title:"Print",cmd:"mcePrint"}),t.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print"})};t.add("print",function(t){n(t),i(t),t.addShortcut("Meta+P","","mcePrint")})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(n){return n.getParam("save_enablewhendirty",!0)},c=function(n){return!!n.getParam("save_onsavecallback")},i=function(n){return!!n.getParam("save_oncancelcallback")},r=function(n,e){n.notificationManager.open({text:n.translate(e),type:"error"})},e=function(n){var e;if(e=t.DOM.getParent(n.id,"form"),!o(n)||n.isDirty()){if(n.save(),c(n))return n.execCallback("save_onsavecallback",n),void n.nodeChanged();e?(n.setDirty(!1),e.onsubmit&&!e.onsubmit()||("function"==typeof e.submit?e.submit():r(n,"Error: Form submit field collision.")),n.nodeChanged()):r(n,"Error: No form element found.")}},l=function(n){var e=a.trim(n.startContent);i(n)?n.execCallback("save_oncancelcallback",n):(n.setContent(e),n.undoManager.clear(),n.nodeChanged())},d=function(n){n.addCommand("mceSave",function(){e(n)}),n.addCommand("mceCancel",function(){l(n)})},s=function(t){return function(n){var e=n.control;t.on("nodeChange dirty",function(){e.disabled(o(t)&&!t.isDirty())})}},u=function(n){n.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:s(n)}),n.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:s(n)}),n.addShortcut("Meta+S","","mceSave")};n.add("save",function(n){u(n),d(n)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");function h(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var u={findAndReplaceDOMText:function(t,n,r,a,i){var o,d,v,f,p,g,c=[],l=0;function s(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(0<t){var r=e[t];if(!r)throw new Error("Invalid capture group");n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}if(v=n.ownerDocument,f=i.getBlockElements(),p=i.getWhiteSpaceElements(),g=i.getShortEndedElements(),d=function e(t){var n;if(3===t.nodeType)return t.data;if(p[t.nodeName]&&!f[t.nodeName])return"";if(n="",h(t))return"\n";if((f[t.nodeName]||g[t.nodeName])&&(n+="\n"),t=t.firstChild)for(;n+=e(t),t=t.nextSibling;);return n}(n)){if(t.global)for(;o=t.exec(d);)c.push(s(o,a));else o=d.match(t),c.push(s(o,a));return c.length&&(l=c.length,function(e,t,n){var r,a,i,o,d=[],c=0,l=e,s=t.shift(),u=0;e:for(;;){if((f[l.nodeName]||g[l.nodeName]||h(l))&&c++,3===l.nodeType&&(!a&&l.length+c>=s[1]?(a=l,o=s[1]-c):r&&d.push(l),!r&&l.length+c>s[0]&&(r=l,i=s[0]-c),c+=l.length),r&&a){if(l=n({startNode:r,startNodeIndex:i,endNode:a,endNodeIndex:o,innerNodes:d,match:s[2],matchIndex:u}),c-=a.length-o,a=r=null,d=[],u++,!(s=t.shift()))break}else if(p[l.nodeName]&&!f[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!h(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===e)break e;l=l.parentNode}}}(n,c,function(e){var m;if("function"!=typeof e){var r=e.nodeType?e:v.createElement(e);m=function(e,t){var n=r.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(v.createTextNode(e)),n}}else m=e;return function(e){var t,n,r,a=e.startNode,i=e.endNode,o=e.matchIndex;if(a===i){var d=a;r=d.parentNode,0<e.startNodeIndex&&(t=v.createTextNode(d.data.substring(0,e.startNodeIndex)),r.insertBefore(t,d));var c=m(e.match[0],o);return r.insertBefore(c,d),e.endNodeIndex<d.length&&(n=v.createTextNode(d.data.substring(e.endNodeIndex)),r.insertBefore(n,d)),d.parentNode.removeChild(d),c}t=v.createTextNode(a.data.substring(0,e.startNodeIndex)),n=v.createTextNode(i.data.substring(e.endNodeIndex));for(var l=m(a.data.substring(e.startNodeIndex),o),s=[],u=0,f=e.innerNodes.length;u<f;++u){var p=e.innerNodes[u],g=m(p.data,o);p.parentNode.replaceChild(g,p),s.push(g)}var h=m(i.data.substring(0,e.endNodeIndex),o);return(r=a.parentNode).insertBefore(t,a),r.insertBefore(l,a),r.removeChild(a),(r=i.parentNode).insertBefore(h,i),r.insertBefore(n,i),r.removeChild(i),h}}(r))),l}}},g=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},m=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},o=function(e,t){var n,r=[];if((n=p.toArray(e.getBody().getElementsByTagName("span"))).length)for(var a=0;a<n.length;a++){var i=g(n[a]);null!==i&&i.length&&i===t.toString()&&r.push(n[a])}return r},f=function(e,t,n){var r=t.get(),a=e.dom;(n=!1!==n)?r++:r--,a.removeClass(o(e,t.get()),"mce-match-marker-selected");var i=o(e,r);return i.length?(a.addClass(o(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(i[0]),r):-1},v=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},x=function(e,t){var n=f(e,t,!0);-1!==n&&t.set(n)},b=function(e,t){var n=f(e,t,!1);-1!==n&&t.set(n)},N=function(e){var t=g(e);return null!==t&&0<t.length},y=function(e,t,n){var r,a,i,o;for(a=p.toArray(e.getBody().getElementsByTagName("span")),r=0;r<a.length;r++){var d=g(a[r]);null!==d&&d.length&&(d===t.get().toString()&&(i||(i=a[r].firstChild),o=a[r].firstChild),m(a[r]))}if(i&&o){var c=e.dom.createRng();return c.setStart(i,0),c.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(c),c}},k=function(e,t){return 0<o(e,t.get()+1).length},C=function(e,t){return 0<o(e,t.get()-1).length},T={done:y,find:function(e,t,n,r,a){n=(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).replace(/\s/g,"\\s"),n=a?"\\b"+n+"\\b":n;var i,o,d,c,l,s=(i=e,o=t,d=new RegExp(n,r?"g":"gi"),(l=i.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",c=i.getBody(),y(i,o,!1),u.findAndReplaceDOMText(d,c,l,!1,i.schema));return s&&(t.set(-1),t.set(f(e,t,!0))),s},next:x,prev:b,replace:function(e,t,n,r,a){var i,o,d,c,l,s,u=t.get();for(r=!1!==r,d=e.getBody(),o=p.grep(p.toArray(d.getElementsByTagName("span")),N),i=0;i<o.length;i++){var f=g(o[i]);if(c=l=parseInt(f,10),a||c===t.get()){for(n.length?(o[i].firstChild.nodeValue=n,m(o[i])):v(e.dom,o[i]);o[++i];){if((c=parseInt(g(o[i]),10))!==l){i--;break}v(e.dom,o[i])}r&&u--}else l>t.get()&&o[i].setAttribute("data-mce-index",l-1)}return t.set(u),r?(s=k(e,t),x(e,t)):(s=C(e,t),b(e,t)),!a&&s},hasNext:k,hasPrev:C},n=function(r,a){return{done:function(e){return T.done(r,a,e)},find:function(e,t,nLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var c=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return c(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e){return!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(e.settings.plugins)||!t.get("tinymcespellchecker")||("undefined"!=typeof window.console&&window.console.log&&window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),0))},h=function(e){return e.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv")},l=function(e){var t=e.getParam("language","en");return e.getParam("spellchecker_language",t)},d=function(e){return e.getParam("spellchecker_rpc_url")},f=function(e){return e.getParam("spellchecker_callback")},s=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)},g=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.util.URI"),p=tinymce.util.Tools.resolve("tinymce.util.XHR"),u=function(e){return e.fire("SpellcheckStart")},r=function(e){return e.fire("SpellcheckEnd")};function v(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var x,o=function(c,r){var n,o,f,h,g,i=[],x=r.dom;function a(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function l(e){var t=c.getElementsByTagName("*"),n=[];e="number"==typeof e?""+e:null;for(var r=0;r<t.length;r++){var o=t[r],i=o.getAttribute("data-mce-index");null!==i&&i.length&&-1!==o.className.indexOf("mce-spellchecker-word")&&(i!==e&&null!==e||n.push(o))}return n}function s(e){for(var t=i.length;t--;)if(i[t]===e)return t;return-1}function t(e){for(var t=0,n=i.length;t<n&&!1!==e(i[t],t);t++);return this}function u(e){var t,n,r=l(e?s(e):null);for(t=r.length;t--;)(n=r[t]).parentNode.insertBefore(n.firstChild,n),n.parentNode.removeChild(n);return this}function d(e){var t=l(s(e)),n=r.dom.createRng();return n.setStartBefore(t[0]),n.setEndAfter(t[t.length-1]),n}return f=r.schema.getBlockElements(),h=r.schema.getWhiteSpaceElements(),g=r.schema.getShortEndedElements(),{text:o=function e(t){var n;if(3===t.nodeType)return t.data;if(h[t.nodeName]&&!f[t.nodeName])return"";if(v(t))return"\n";if(n="",(f[t.nodeName]||g[t.nodeName])&&(n+="\n"),t=t.firstChild)for(;n+=e(t),t=t.nextSibling;);return n}(c),matches:i,each:t,filter:function(n){var r=[];return t(function(e,t){n(e,t)&&r.push(e)}),i=r,this},reset:function(){return i.splice(0,i.length),u(),this},matchFromElement:function(e){return i[e.getAttribute("data-mce-index")]},elementFromMatch:function(e){return l(s(e))[0]},find:function(e,t){if(o&&e.global)for(;n=e.exec(o);)i.push(a(n,t));return this},add:function(e,t,n){return i.push({start:e,end:e+t,text:o.substr(e,t),data:n}),this},wrap:function(e){return i.length&&function(e,t,n){var r,o,i,c,a,l=[],s=0,u=e,d=0;(t=t.slice(0)).sort(function(e,t){return e.start-t.start}),a=t.shift();e:for(;;){if((f[u.nodeName]||g[u.nodeName]||v(u))&&s++,3===u.nodeType&&(!o&&u.length+s>=a.end?(o=u,c=a.end-s):r&&l.push(u),!r&&u.length+s>a.start&&(r=u,i=a.start-s),s+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:c,innerNodes:l,match:a.text,matchIndex:d}),s-=o.length-c,o=r=null,l=[],d++,!(a=t.shift()))break}else if(h[u.nodeName]&&!f[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!v(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(c,i,function(o){function v(e,t){var n=i[t];n.stencil||(n.stencil=o(n));var r=n.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(x.doc.createTextNode(e)),r}return function(e){var t,n,r,o=e.startNode,i=e.endNode,c=e.matchIndex,a=x.doc;if(o===i){var l=o;r=l.parentNode,0<e.startNodeIndex&&(t=a.createTextNode(l.data.substring(0,e.startNodeIndex)),r.insertBefore(t,l));var s=v(e.match,c);return r.insertBefore(s,l),e.endNodeIndex<l.length&&(n=a.createTextNode(l.data.substring(e.endNodeIndex)),r.insertBefore(n,l)),l.parentNode.removeChild(l),s}t=a.createTextNode(o.data.substring(0,e.startNodeIndex)),n=a.createTextNode(i.data.substring(e.endNodeIndex));for(var u=v(o.data.substring(e.startNodeIndex),c),d=[],f=0,h=e.innerNodes.length;f<h;++f){var g=e.innerNodes[f],m=v(g.data,c);g.parentNode.replaceChild(m,g),d.push(m)}var p=v(i.data.substring(0,e.endNodeIndex),c);return(r=o.parentNode).insertBefore(t,o),r.insertBefore(u,o),r.removeChild(o),(r=i.parentNode).insertBefore(p,i),r.insertBefore(n,i),r.removeChild(i),p}}(e)),this},unwrap:u,replace:function(e,t){var n=d(e);return n.deleteContents(),0<t.length&&n.insertNode(r.dom.doc.createTextNLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.EditorManager"),s=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.VK"),d=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},m=t.DOM,n=function(e){e.keyCode!==f.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==f.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=y.explode(d(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):m.get(e[0]):":next"===e[1]?u(1):m.get(e[1]))){var t=c.get(o.id||o.name);o.id&&t?t.focus():a.setTimeout(function(){s.webkit||window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&c.get(n.id)&&-1!==t.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(t)}if(o=m.select(":input:enabled,*[tabindex]:not(iframe)"),y.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&m.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),s.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e,t,n,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),y=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},x=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,arguments))}},C=function(e){return function(){return e}},u=function(e){return e},R=function(i){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var u=new Array(arguments.length-1),n=1;n<arguments.length;n++)u[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=u.concat(n);return i.apply(null,o)}},m=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,arguments)}},a=function(e){return e()},c=C(!1),l=C(!0),f=c,s=l,d=function(){return g},g=(r={fold:function(e,t){return e()},is:f,isSome:f,isNone:s,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:t,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:f,forall:s,filter:d,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:C("none()")},Object.freeze&&Object.freeze(r),r),h=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:s,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return h(e(n))},ap:function(e){return e.fold(d,function(e){return h(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:g},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(f,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},S={some:h,none:d,from:function(e){return null===e||e===undefined?g:h(e)}},p=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},v=p("string"),b=p("array"),w=p("boolean"),T=p("function"),N=p("number"),D=(o=Array.prototype.indexOf)===undefined?function(e,t){return _(e,t)}:function(e,t){return o.call(e,t)},E=function(e,t){return-1<D(e,t)},O=function(e,t){return W(e,t).isSome()},A=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},k=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)},P=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n},I=function(e,t,n){return function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n,e)}(e,function(e){n=t(n,e)}),n},B=function(e,t,n){return k(e,function(e){n=t(n,e)}),n},M=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return S.some(o)}return S.none()},W=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n,e))return S.some(n);return S.none()},_=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},L=Array.prototype.push,q=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Array.prototype.isPrototypeOf(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);L.apply(t,e[n])}return t},F=function(e,t){var n=A(e,t);return q(n)},j=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n,e))return!1;return!0},z=Array.prototype.slice,H=function(e){var t=z.call(e,0);return t.reverse(),t},U=(T(Array.from)&&Array.from,Object.keys),V=function(e,t){for(var n=U(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i,e)}},G=function(e,r){return Y(e,function(e,t,n){return{k:t,v:r(e,t,n)}})},Y=function(r,o){var i={};return V(r,function(e,t){var n=o(e,t,r);i[n.k]=n.v}),i},X=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return k(t,function(e,t){r[e]=C(n[t])}),r}},K=function(e){return e.slice(0).sort()},J=function(e,t){throw new Error("All required keys ("+K(e).join(", ")+") were not specified. Specified keys were: "+K(t).join(", ")+".")},$=function(e){throw new Error("Unsupported keys for object: "+K(e).join(", "))},Q=function(t,e){if(!b(e))throw new Error("The "+t+" fields must be an array. Was: "+e+".");k(e,function(e){if(!v(e))throw new Error("The value "+e+" in the "+t+" fields was not a string.")})},Z=function(e){var n=K(e);M(n,function(e,t){return t<n.length-1&&e===n[t+1]}).each(function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+n.join(", ")+"].")})},ee=function(o,i){var u=o.concat(i);if(0===u.length)Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=tinymce.util.Tools.resolve("tinymce.util.XHR"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=function(e){return e.getParam("template_cdate_classes","cdate")},s=function(e){return e.getParam("template_mdate_classes","mdate")},u=function(e){return e.getParam("template_selected_content_classes","selcontent")},p=function(e){return e.getParam("template_preview_replace_values")},m=function(e){return e.getParam("template_replace_values")},a=function(e){return e.templates},d=function(e){return e.getParam("template_cdate_format",e.getLang("template.cdate_format"))},f=function(e){return e.getParam("template_mdate_format",e.getLang("template.mdate_format"))},g=function(e){return e.getParam("template_popup_width",600)},h=function(e){return Math.min(t.DOM.getViewPort().h,e.getParam("template_popup_height",500))},y=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},v=function(e,t,n){var a="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),c="January February March April May June July August September October November December".split(" ");return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",y(n.getMonth()+1,2))).replace("%d",y(n.getDate(),2))).replace("%H",""+y(n.getHours(),2))).replace("%M",""+y(n.getMinutes(),2))).replace("%S",""+y(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(c[n.getMonth()]))).replace("%b",""+e.translate(l[n.getMonth()]))).replace("%A",""+e.translate(r[n.getDay()]))).replace("%a",""+e.translate(a[n.getDay()]))).replace("%%","%")},M=function(e,n,t){return o.each(t,function(e,t){"function"==typeof e&&(e=e(t)),n=n.replace(new RegExp("\\{\\$"+t+"\\}","g"),e)}),n},_=function(e,t){var a=e.dom,r=m(e);o.each(a.select("*",t),function(n){o.each(r,function(e,t){a.hasClass(n,t)&&"function"==typeof r[t]&&r[t](n)})})},b=function(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)},n=function(t,n){return function(){var e=a(t);"function"!=typeof e?"string"==typeof e?c.send({url:e,success:function(e){n(JSON.parse(e))}}):n(e):e(n)}},T=M,r=_,x=function(t,e,n){var a,r,l=t.dom,c=t.selection.getContent();n=M(0,n,m(t)),a=l.create("div",null,n),(r=l.select(".mceTmpl",a))&&0<r.length&&(a=l.create("div",null)).appendChild(r[0].cloneNode(!0)),o.each(l.select("*",a),function(e){b(e,i(t).replace(/\s+/g,"|"))&&(e.innerHTML=v(t,d(t))),b(e,s(t).replace(/\s+/g,"|"))&&(e.innerHTML=v(t,f(t))),b(e,u(t).replace(/\s+/g,"|"))&&(e.innerHTML=c)}),_(t,a),t.execCommand("mceInsertContent",!1,a.innerHTML),t.addVisual()},l=function(e){e.addCommand("mceInsertTemplate",function(l){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var c=new Array(arguments.length-1),n=1;n<arguments.length;n++)c[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),a=0;a<n.length;a++)n[a]=arguments[a];var r=c.concat(n);return l.apply(null,r)}}(x,e))},P=function(a){a.on("PreProcess",function(e){var t=a.dom,n=f(a);o.each(t.select("div",e.node),function(e){t.hasClass(e,"mceTmpl")&&(o.each(t.select("*",e),function(e){t.hasClass(e,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(e.innerHTML=v(a,n))}),r(a,e))})})},S=function(t,e,n){if(-1===n.indexOf("<html>")){var a="";o.each(t.contentCSS,function(e){a+='<link type="text/css" rel="stylesheet" href="'+t.documentBaseURI.toAbsolute(e)+'">'});var r=t.settings.body_class||"";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_class","","hash"))[t.id]||""),n="<!DOCTYPE html><html><head>"+a+'</head><body class="'+r+'">'+n+"</body></html>"}n=T(t,n,p(t));var l=e.find("iframe")[0].getEl().contentWindow.document;l.open(),l.write(n),l.close()},w=function(n,e){var a,r,t=[];if(e&&0!==e.length)o.each(e,function(e){t.push({selected:!t.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),(a=n.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:t,onselect:function(e){var t=e.control.value();t.url?c.send({url:t.url,success:function(e){S(n,a,r=e)}}):(r=t.content,S(n,a,r)),a.find("#description")[0].text(e.control.value().description)}}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){x(n,!1,r)},minWidth:g(n),minHeight:h(n)})).find("listbox")[0].fire("select");else{var l=n.translate("No templLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t,o){var r;return t.dom.getParents(t.selection.getStart(),function(t){var e;(e=t.style["forecolor"===o?"color":"background-color"])&&(r=r||e)}),r},g=function(t){var e,o=[];for(e=0;e<t.length;e+=2)o.push({text:t[e+1],color:"#"+t[e]});return o},r=function(t,e,o){t.undoManager.transact(function(){t.focus(),t.formatter.apply(e,{value:o}),t.nodeChanged()})},e=function(t,e){t.undoManager.transact(function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()})},o=function(o){o.addCommand("mceApplyTextcolor",function(t,e){r(o,t,e)}),o.addCommand("mceRemoveTextcolor",function(t){e(o,t)})},F=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],l=function(t){return t.getParam("textcolor_map",a)},c=function(t){return t.getParam("textcolor_rows",5)},u=function(t){return t.getParam("textcolor_cols",8)},m=function(t){return t.getParam("color_picker_callback",null)},s=function(t){return t.getParam("forecolor_map",l(t))},d=function(t){return t.getParam("backcolor_map",l(t))},f=function(t){return t.getParam("forecolor_rows",c(t))},b=function(t){return t.getParam("backcolor_rows",c(t))},p=function(t){return t.getParam("forecolor_cols",u(t))},C=function(t){return t.getParam("backcolor_cols",u(t))},y=m,v=function(t){return"function"==typeof m(t)},h=tinymce.util.Tools.resolve("tinymce.util.I18n"),P=function(t,e,o,r){var n,a,l,c,i,u,m,s=0,d=F.DOM.uniqueId("mcearia"),f=function(t,e){var o="transparent"===t;return'<td class="mce-grid-cell'+(o?" mce-colorbtn-trans":"")+'"><div id="'+d+"-"+s+++'" data-mce-color="'+(t||"")+'" role="option" tabIndex="-1" style="'+(t?"background-color: "+t:"")+'" title="'+h.translate(e)+'">'+(o?"×":"")+"</div></td>"};for((n=g(o)).push({text:h.translate("No color"),color:"transparent"}),l='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',c=n.length-1,u=0;u<e;u++){for(l+="<tr>",i=0;i<t;i++)l+=c<(m=u*t+i)?"<td></td>":f((a=n[m]).color,a.text);l+="</tr>"}if(r){for(l+='<tr><td colspan="'+t+'" class="mce-custom-color-btn"><div id="'+d+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+d+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+h.translate("Custom...")+"</button></div></td></tr>",l+="<tr>",i=0;i<t;i++)l+=f("","Custom color");l+="</tr>"}return l+="</tbody></table>"},k=function(t,e){t.style.background=e,t.setAttribute("data-mce-color",e)},x=function(o){return function(t){var e=t.control;e._color?o.execCommand("mceApplyTextcolor",e.settings.format,e._color):o.execCommand("mceRemoveTextcolor",e.settings.format)}},T=function(r,c){return function(t){var e,a=this.parent(),o=n(r,a.settings.format),l=function(t){r.execCommand("mceApplyTextcolor",a.settings.format,t),a.hidePanel(),a.color(t)};F.DOM.getParent(t.target,".mce-custom-color-btn")&&(a.hidePanel(),y(r).call(r,function(t){var e,o,r,n=a.panel.getEl().getElementsByTagName("table")[0];for(e=i.map(n.rows[n.rows.length-1].childNodes,function(t){return t.firstChild}),r=0;r<e.length&&(o=e[r]).getAttribute("data-mce-color");r++);if(r===c)for(r=0;r<c-1;r++)k(e[r],e[r+1].getAttribute("data-mce-color"));k(o,t),l(t)},o)),(e=t.target.getAttribute("data-mce-color"))?(this.lastId&&F.DOM.get(this.lastId).setAttribute("aria-selected","false"),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,"transparent"===e?(r.execCommand("mceRemoveTextcolor",a.settings.format),a.hidePanel(),a.resetColor()):l(e)):null!==e&&a.hidePanel()}},_=function(n,a){return function(){var t=a?p(n):C(n),e=a?f(n):b(n),o=a?s(n):d(n),r=v(n);return P(t,e,o,r)}},A=function(t){t.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!0),onclick:T(t,p(t))},onclick:x(t)}),t.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!1),onclick:T(t,C(t))},onclick:x(t)})};t.add("textcolor",function(t){o(t),A(t)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var r=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return r(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{setPatterns:function(t){e.set(t)},getPatterns:function(){return e.get()}}},e=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"***",end:"***",format:["bold","italic"]},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],a=function(t){return t.textpattern_patterns!==undefined?t.textpattern_patterns:e},o=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=tinymce.util.Tools.resolve("tinymce.util.VK"),g=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),h=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=function(t,e){for(var n=0;n<t.length;n++)if(0===e.indexOf(t[n].start)&&(!t[n].end||e.lastIndexOf(t[n].end)===e.length-t[n].end.length))return t[n]},c=function(t,e,n,r){var a,o,i,s,d,f,l=t.sort(function(t,e){return t.start.length>e.start.length?-1:t.start.length<e.start.length?1:0});for(o=0;o<l.length;o++)if((a=l[o]).end!==undefined&&(s=a,d=n,f=r,e.substr(d-s.end.length-f,s.end.length)===s.end)&&0<n-r-(i=a).end.length-i.start.length)return a},s=function(t,e,n){if(!1!==e.collapsed){var r=e.startContainer,a=r.data,o=!0===n?1:0;if(3===r.nodeType){var i=c(t,a,e.startOffset,o);if(i!==undefined){var s=a.lastIndexOf(i.end,e.startOffset-o),d=a.lastIndexOf(i.start,s-i.end.length);if(s=a.indexOf(i.end,d+i.start.length),-1!==d){var f=document.createRange();f.setStart(r,d),f.setEnd(r,s+i.end.length);var l=m(t,f.toString());if(!(i===undefined||l!==i||r.data.length<=i.start.length+i.end.length))return{pattern:i,startOffset:d,endOffset:s}}}}}},d=function(t,e,n){var r=t.selection.getRng(!0),a=s(e,r,n);if(a)return function(a,o,i,t){var s=h.isArray(i.pattern.format)?i.pattern.format:[i.pattern.format];if(0!==h.grep(s,function(t){var e=a.formatter.get(t);return e&&e[0].inline}).length)return a.undoManager.transact(function(){var t,e,n,r;t=o,e=i.pattern,n=i.endOffset,r=i.startOffset,(t=0<r?t.splitText(r):t).splitText(n-r+e.end.length),t.deleteData(0,e.start.length),t.deleteData(t.data.length-e.end.length,e.end.length),o=t,s.forEach(function(t){a.formatter.apply(t,{},o)})}),o}(t,r.startContainer,a)},f=function(t,e){return d(t,e,!0)},l=function(t,e){return d(t,e,!1)},u=function(t,e){var n,r,a,o,i,s,d,f,l,c,u;if(n=t.selection,r=t.dom,n.isCollapsed()&&(d=r.getParent(n.getStart(),"p"))){for(l=new g(d,d);i=l.next();)if(3===i.nodeType){o=i;break}if(o){if(!(f=m(e,o.data)))return;if(a=(c=n.getRng(!0)).startContainer,u=c.startOffset,o===a&&(u=Math.max(0,u-f.start.length)),h.trim(o.data).length===f.start.length)return;f.format&&(s=t.formatter.get(f.format))&&s[0].block&&(o.deleteData(0,f.start.length),t.formatter.apply(f.format,{},o),c.setStart(a,u),c.collapse(!0),n.setRng(c)),f.cmd&&t.undoManager.transact(function(){o.deleteData(0,f.start.length),t.execCommand(f.cmd)})}}},p=function(t,e,n){for(var r=0;r<t.length;r++)if(n(t[r],e))return!0},y={handleEnter:function(t,e){var n,r;(n=l(t,e))&&((r=t.dom.createRng()).setStart(n,n.data.length),r.setEnd(n,n.data.length),t.selection.setRng(r)),u(t,e)},handleInlineKey:function(t,e){var n,r,a,o,i;(n=f(t,e))&&(i=t.dom,r=n.data.slice(-1),/[\u00a0 ]/.test(r)&&(n.deleteData(n.data.length-1,1),a=i.doc.createTextNode(r),i.insertAfter(a,n.parentNode),(o=i.createRng()).setStart(a,1),o.setEnd(a,1),t.selection.setRng(o)))},checkCharCode:function(t,e){return p(t,e,function(t,e){return t.charCodeAt(0)===e.charCode})},checkKeyCode:function(t,e){return p(t,e,function(t,e){return t===e.keyCode&&!1===i.modifierPressed(e)})}},v=function(e,n){var r=[",",".",";",":","!","?"],a=[32];e.on("keydown",function(t){13!==t.keyCode||i.modifierPressed(t)||y.handleEnter(e,n.get())},!0),e.on("keyup",function(t){y.checkKeyCode(a,t)&&y.handleInlineKey(e,n.get())}),e.on("keypress",function(t){y.checkCharCode(r,t)&&o.setEditorTimeout(e,function(){y.handleInlineKey(e,n.get())})})};t.add("textpattern",function(t){var e=r(a(t.settings));return v(t,e),n(e)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e,n,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.util.I18n"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){return t.getParam("toc_class","mce-toc")},m=function(t){var e=t.getParam("toc_header","h2");return/^h[1-6]$/.test(e)?e:"h2"},c=function(t){var e=parseInt(t.getParam("toc_depth","3"),10);return 1<=e&&e<=9?e:3},a=(e="mcetoc_",n=0,function(){var t=(new Date).getTime().toString(32);return e+t+(n++).toString(32)}),v=function(n){var o=l(n),t=m(n),e=function(t){var e,n=[];for(e=1;e<=t;e++)n.push("h"+e);return n.join(",")}(c(n)),r=n.$(e);return r.length&&/^h[1-9]$/i.test(t)&&(r=r.filter(function(t,e){return!n.dom.hasClass(e.parentNode,o)})),i.map(r,function(t){return{id:t.id?t.id:a(),level:parseInt(t.nodeName.replace(/^H/i,""),10),title:n.$.text(t),element:t}})},d=function(t){var e,n,o,r,i,c,l,a="",d=v(t),u=function(t){var e,n=9;for(e=0;e<t.length;e++)if(t[e].level<n&&(n=t[e].level),1===n)return n;return n}(d)-1;if(!d.length)return"";for(a+=(i=m(t),c=f.translate("Table of Contents"),l="</"+i+">","<"+i+' contenteditable="true">'+s.DOM.encode(c)+l),e=0;e<d.length;e++){if((o=d[e]).element.id=o.id,r=d[e+1]&&d[e+1].level,u===o.level)a+="<li>";else for(n=u;n<o.level;n++)a+="<ul><li>";if(a+='<a href="#'+o.id+'">'+o.title+"</a>",r!==o.level&&r)for(n=o.level;r<n;n--)a+="</li></ul><li>";else a+="</li>",r||(a+="</ul>");u=o.level}return a},u=function(t){var e=l(t),n=t.$("."+e);n.length&&t.undoManager.transact(function(){n.html(d(t))})},o={hasHeaders:function(t){return 0<v(t).length},insertToc:function(t){var e,n,o,r,i=l(t),c=t.$("."+i);o=t,!(r=c).length||0<o.dom.getParents(r[0],".mce-offscreen-selection").length?t.insertContent((n=d(e=t),'<div class="'+e.dom.encode(l(e))+'" contenteditable="false">'+n+"</div>")):u(t)},updateToc:u},r=function(t){t.addCommand("mceInsertToc",function(){o.insertToc(t)}),t.addCommand("mceUpdateToc",function(){o.updateToc(t)})},h=function(t){var n=t.$,o=l(t);t.on("PreProcess",function(t){var e=n("."+o,t.node);e.length&&(e.removeAttr("contentEditable"),e.find("[contenteditable]").removeAttr("contentEditable"))}),t.on("SetContent",function(){var t=n("."+o);t.length&&(t.attr("contentEditable",!1),t.children(":first-child").attr("contentEditable",!0))})},g=function(n){return function(t){var e=t.control;n.on("LoadContent SetContent change",function(){e.disabled(n.readonly||!o.hasHeaders(n))})}},T=function(t){var e;t.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:g(t)}),t.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),t.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:g(t)}),t.addContextToolbar((e=t,function(t){return t&&e.dom.is(t,"."+l(e))&&e.getBody().contains(t)}),"tocupdate")};t.add("toc",function(t){r(t),T(t),h(t)})}();
|
||||
@@ -0,0 +1,154 @@
|
||||
.mce-visualblocks p {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h1 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h2 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h3 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h4 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h5 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h6 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks div:not([data-mce-bogus]) {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks section {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks article {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks blockquote {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks address {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks pre {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks figure {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks hgroup {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks aside {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks figcaption {
|
||||
border: 1px dashed #BBB;
|
||||
}
|
||||
|
||||
.mce-visualblocks ul {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks ol {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks dl {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var o=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return o(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){e.fire("VisualBlocks",{state:t})},s=function(e){return e.getParam("visualblocks_default_state",!1)},c=function(e){return e.settings.visualblocks_content_css},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=l.DOM.uniqueId(),r=function(e,t){var n=u.toArray(e.getElementsByTagName("link"));if(0===u.grep(n,function(e){return e.id===a}).length){var o=l.DOM.create("link",{id:a,rel:"stylesheet",href:t});e.getElementsByTagName("head")[0].appendChild(o)}},m=function(e,t,n){var o=e.dom,s=c(e);r(e.getDoc(),s||t+"/css/visualblocks.css"),o.toggleClass(e.getBody(),"mce-visualblocks"),n.set(!n.get()),i(e,n.get())},f=function(e,t,n){e.addCommand("mceVisualBlocks",function(){m(e,t,n)})},d=function(t,e,n){t.on("PreviewFormats AfterPreviewFormats",function(e){n.get()&&t.dom.toggleClass(t.getBody(),"mce-visualblocks","afterpreviewformats"===e.type)}),t.on("init",function(){s(t)&&m(t,e,n)}),t.on("remove",function(){t.dom.removeClass(t.getBody(),"mce-visualblocks")})},n=function(n,o){return function(e){var t=e.control;t.active(o.get()),n.on("VisualBlocks",function(e){t.active(e.state)})}},v=function(e,t){e.addButton("visualblocks",{active:!1,title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n(e,t)}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n(e,t),selectable:!0,context:"view",prependToContext:!0})};e.add("visualblocks",function(e,t){var n=o(!1);f(e,t,n),v(e,n),d(e,t,n)})}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var n,e,t,r,o,u=function(n){var e=n,t=function(){return e};return{get:t,set:function(n){e=n},clone:function(){return u(t())}}},i=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=function(n){return{isEnabled:function(){return n.get()}}},a=function(n,e){return n.fire("VisualChars",{state:e})},f={"\xa0":"nbsp","\xad":"shy"},l=function(n,e){var t,r="";for(t in n)r+=t;return new RegExp("["+r+"]",e?"g":"")},d=function(n){var e,t="";for(e in n)t&&(t+=","),t+="span.mce-"+n[e];return t},s={charMap:f,regExp:l(f),regExpGlobal:l(f,!0),selector:d(f),charMapToRegExp:l,charMapToSelector:d},m=function(n){return function(){return n}},N=m(!1),E=m(!0),T=N,O=E,v=function(){return g},g=(r={fold:function(n,e){return n()},is:T,isSome:T,isNone:O,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:e,map:v,ap:v,each:function(){},bind:v,flatten:v,exists:T,forall:O,filter:v,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:m("none()")},Object.freeze&&Object.freeze(r),r),h=function(t){var n=function(){return t},e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:O,isNone:T,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return h(n(t))},ap:function(n){return n.fold(v,function(n){return h(n(t))})},each:function(n){n(t)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(t)?o:g},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(T,function(n){return e(t,n)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},p=function(n){return null===n||n===undefined?g:h(n)},C=(o="function",function(n){return function(n){if(null===n)return"null";var e=typeof n;return"object"===e&&Array.prototype.isPrototypeOf(n)?"array":"object"===e&&String.prototype.isPrototypeOf(n)?"string":e}(n)===o}),D=function(n,e){for(var t=0,r=n.length;t<r;t++)e(n[t],t,n)},M=(Array.prototype.slice,C(Array.from)&&Array.from,function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:m(n)}}),y={fromHtml:function(n,e){var t=(e||document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throw console.error("HTML does not have a single root node",n),"HTML must have a single root node";return M(t.childNodes[0])},fromTag:function(n,e){var t=(e||document).createElement(n);return M(t)},fromText:function(n,e){var t=(e||document).createTextNode(n);return M(t)},fromDom:M,fromPoint:function(n,e,t){var r=n.dom();return p(r.elementFromPoint(e,t)).map(M)}},_={ATTRIBUTE:Node.ATTRIBUTE_NODE,CDATA_SECTION:Node.CDATA_SECTION_NODE,COMMENT:Node.COMMENT_NODE,DOCUMENT:Node.DOCUMENT_NODE,DOCUMENT_TYPE:Node.DOCUMENT_TYPE_NODE,DOCUMENT_FRAGMENT:Node.DOCUMENT_FRAGMENT_NODE,ELEMENT:Node.ELEMENT_NODE,TEXT:Node.TEXT_NODE,PROCESSING_INSTRUCTION:Node.PROCESSING_INSTRUCTION_NODE,ENTITY_REFERENCE:Node.ENTITY_REFERENCE_NODE,ENTITY:Node.ENTITY_NODE,NOTATION:Node.NOTATION_NODE},A=function(n){return n.dom().nodeName.toLowerCase()},S=function(n){return n.dom().nodeType},b=function(e){return function(n){return S(n)===e}},I=b(_.ELEMENT),R=b(_.TEXT),k=b(_.DOCUMENT),x={name:A,type:S,value:function(n){return n.dom().nodeValue},isElement:I,isText:R,isDocument:k,isComment:function(n){return S(n)===_.COMMENT||"#comment"===A(n)}},P=function(n){return'<span data-mce-bogus="1" class="mce-'+s.charMap[n]+'">'+n+"</span>"},U=function(n,e){var t=[],r=function(n,e){for(var t=n.length,r=new Array(t),o=0;o<t;o++){var u=n[o];r[o]=e(u,o,n)}return r}(n.dom().childNodes,y.fromDom);return D(r,function(n){e(n)&&(t=t.concat([n])),t=t.concat(U(n,e))}),t},w={isMatch:function(n){return x.isText(n)&&x.value(n)!==undefined&&s.regExp.test(x.value(n))},filterDescendants:U,findParentElm:function(n,e){for(;n.parentNode;){if(n.parentNode===e)return n;n=n.parentNode}},replaceWithSpans:function(n){return n.replace(s.regExpGlobal,P)}},B=function(t,n){var r,o,e=w.filterDescendants(y.fromDom(n),w.isMatch);D(e,function(n){var e=w.replaceWithSpans(x.value(n));for(o=t.dom.create("div",null,e);r=o.lastChild;)t.dom.insertAfter(r,n.dom());t.dom.remove(n.dom())})},L=function(e,n){var t=e.dom.select(s.selector,n);D(t,function(n){e.dom.remove(n,1)})},G=B,V=L,Y=function(n){var e=n.getBody(),t=n.selection.getBookmark(),r=w.findParentElm(n.selection.getNode(),e);r=r!==undefined?r:e,L(n,r),B(n,r),n.selection.moveToBookmark(t)},F=function(n,e){var t,r=n.getBody(),o=n.selection;e.set(!e.get()),a(n,e.get()),t=o.getBookmark(),!0===e.get()?G(n,r):V(n,r),o.moveToBookmark(t)},j=function(n,e){n.addCommand("mceVisualChars",function(){F(n,e)})},q=tinymce.util.Tools.resolve("tinymce.util.Delay"),H=function(e,t){var r=q.debounce(function(){Y(e)},300);!1!==e.settings.forced_root_block&&e.on("Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),t=tinymce.util.Tools.resolve("tinymce.Env"),n="[-'\\.\u2018\u2019\u2024\ufe52\uff07\uff0e]",r="[:\xb7\xb7\u05f4\u2027\ufe13\ufe55\uff1a]",E="[\xb1+*/,;;\u0589\u060c\u060d\u066c\u07f8\u2044\ufe10\ufe14\ufe50\ufe54\uff0c\uff1b]",o="[0-9\u0660-\u0669\u066b\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]",T="\\r",i="\\n",c="[\x0B\f\x85\u2028\u2029]",a="[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b6-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u19b0-\u19c0\u19c8\u19c9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1baa\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]",s="[\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200e\u200f\u202a-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb]",f="[\u3031-\u3035\u309b\u309c\u30a0-\u30fa\u30fc-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff9d]",l="[=_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f\u2200-\u22ff<>]",N="[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]",R={characterIndices:{ALETTER:0,MIDNUMLET:1,MIDLETTER:2,MIDNUM:3,NUMERIC:4,CR:5,LF:6,NEWLINE:7,EXTEND:8,FORMAT:9,KATAKANA:10,EXTENDNUMLET:11,AT:12,OTHER:13},SETS:[new RegExp("[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}.mce-content-body{line-height:1.3}
|
||||