Futja e nje butoni duke perdorur modulin CEWP ne MS SharePoint

Nje nder perdorimet e shumta ne ditet e sotit, pothuajse ne cdo kompani/institucion eshte platforma MS SharePoint, e cila mund te perdoret per qellime te ndryshme ne intranet apo ekstranet sic jane: menaxhim te permbajtjes, menaxhim te dokumenteve, kerkim te avancuar, kolaborim, personalizim, blogje, wiki, intelegjence biznisore, etj. Kjo platforme permbane ne vete shume vecori apo karakteristika te ndryshme si dhe aplikacione/module te ndryshme, e qe quhen ndryshe edhe “Web parts”. Nje nder to eshte “Content Editor Web Part” (CEWP) per te cilin do te mundohem t’i elaboroj disa shfrytezime apo “tips & tricks” ne vijim.

Conent Editor Web Part eshte nje modul i cili sherben per futjen e tekstit te formatuar, tabela te ndryshme, butona, linqe si dhe imazhe ne web hapesirat apo faqet e intranetit.

Ky mini aplikacion qe vjen i integruar ne MS SharePoint: 2001, 2003, 2007, 2010 eshte pak a shume i ngjashem me modulin WYSIWYG (What You See Is What You Get), mirepo i integruar ne Sharepoint, dhe i cili ne kombinim me gjuhen programuese HTML mund te gjeje zbatim mjaft te madh.


“Tips & Tricks” permes Content Editor Web Part

Padyshim se ky modul mund te shfrytezohet ne menyra te ndryshme, mirepo une do te fokusohem ne nje funksionalitet “interesant” :), qe ne kombinim me gjuhen programuese HTML mund te perdoret per futjen e butonave (qe nderlidhet me ndonje forme ezkistuese – psh custom list) brenda faqes se intranetit.
Jemi deshmitar te faktit se moduli “Custom List” (nje modul tjeter qe vije ne kuader te SharePoint) permbane ne vete butonin “New Item”, gje qe per disa persona (gjithashtu edhe per mua) ne raste te caktuara duket jo i “pershtatshem”, e sidomos psh kur krijohet ndonje projekt. Ne kete artikull do te mundohem te tregoj “mshefjen” e ketij butoni dhe zevendesimin e tij me nje buton perkates. Pra ne vend se ne forme te figuroje butoni “New Item”, ai mund te zevendesohet psh me butonin “Add new project”, qe mund te realizohet duke perdorur modulin “Content Editor Web Part” ne kombinim me modulin “Custom List”!

Per te demonstruar futjen e nje butoni permes ketij moduli, le te supozojme qe kemi nje faqe te krijuar ne intranet me emrin: “Information Technology”, e cila faqe permbane nje forme apo liste qe quhet “Projects”.

Le te permbaje forma “Projects” keto fusha: Project Title, Description, Start Date, End Date, Status (Open, Waiting, Completed).

Pamja e formes “Projects” pa perdorur Content Editor Web Part do te dukej keshtu:

Pas klikimit te butonit New Item, forma do te paraqitet si meposhte:

Sic e ceka edhe mesiper, butoni “New Item” (default) qe gjendet brenda formes tani deshirojme t’a zevendesojme me butonin e ri “Add new project”, te cilen mund ta realizojme duke i ndjekur hapat si ne vijim.

Hapi 1:
Ne pjesen ku eshte e vendosur forma/lista “Projects”, duhet te futet edhe Content Editor Web Part (shih meposhte).


Hapi 2:
Klikohet tek butoni Open tool pane, dhe ne menyre qe te futet kodi burimor i HTML, perkatesisht butoni “Add new project” duhet te klikohet tek butoni Source Editor.


Hapi 3:
Kopjohet kodi burimor:

<BR><A href=” http://intranet/InformationTechnology/Lists/Projects/NewForm.aspx?source=http://intranet/InformationTechnology/Lists/Projects /AllItems.aspx “><STRONG><U><FONT color=#ff0000 size=2>Add new project</FONT></U></STRONG></A>

Dhe futet ne hapesiren e Source Editor. Ne fund klikohet ne butonin Save, me c’rast paraqitet butoni “Add new project” ne formen e projektit dhe forma perfundimtare do te dukej si meposhte:

Shenim:
Githashtu duhet te kihet parasysh qe tek forma “Projects” duhet te nderrohet opcioni “Toolbar Type” prej “Full Toolbar” ne “No Toolbar”.

Sqarimi i kodit burimor te mesiperm:

–  http://intranet/InformationTechnology/Lists/Projects/NewForm.aspx  –  paraqet URL-ne e formes “Projects” pas klikimt te “New Item”

–  source=http://intranet/InformationTechnology/Lists/Projects/AllItems.aspx  –  paraqet URL-ne e formes “Projects” pas plotesimit/anulimit te saj, dmth ne cilen faqe apo pjese te faqes deshiron te te ktheje plotesimi apo anulimi i formes

–  “Add new project” tregon emrin e butonit.

6 Responses to Futja e nje butoni duke perdorur modulin CEWP ne MS SharePoint

  1. Lima says:

    Shume blog i mire .Presim edhe postime tjera 🙂

  2. egzonche says:

    Shkrim i mire, faleminderit.

  3. egzonche says:

    Blog i mire. Vazhdo 🙂

  4. mentorp says:

    Faleminderit per “komplimentet”. 🙂

  5. rkqiku says:

    Tor, urime per artikullin! Shume tips i mire! Vec sa per me shtu, kjo mund te arrihet edhe nese shtohet nje content type i ri i cili do te dilte nen butoni New, ne kete rast New -> Project. Te kisha inkuraju me vazhdu me postime 🙂

    • mentorp says:

      Po Rexhe, mire e keni. Bon edhe ne ate menyre, mirepo ne ate rast ne forme do te paraqitet edhe butoni/dropdown menyja “Actions” si dhe “View”, qe ndoshta per dike do te ishte i “panevojshem”. 🙂

Leave a reply to mentorp Cancel reply